A little Soteria API Library written in Python
- Python 100%
| assets | chore: new readme file | |
| examples | Add asset helper class to retrive files (e.g pfps, banners, etc) from the CDN ( #1 ) | |
| src/soteria | feat(User): add limit & offset params for fetch_post & fetch_liked_posts | |
| .gitignore | style: lint | |
| .pre-commit-config.yaml | style: lint | |
| LICENSE | Initial commit | |
| pdm.lock | chore: add linters & pre-commit | |
| pyproject.toml | chore: add project urls to pyproject.toml | |
| README.md | chore: new readme file | |
Pyteria
Example
import asyncio
import soteria
async def main():
cache = soteria.MemoryCache()
client = soteria.Client(auth="<TOKEN HERE>", cache=cache)
# fetch a user from the api
user = await soteria.User.fetch(client, 12345)
print(user)
# fetch the list of followers
followers = await user.fetch_followers()
print(followers)
# you can always access the cached list of followers if async is not allowed
print(user.followers)
# remember to close the client after execution
await client.close()
asyncio.run(main())
Features
- Mostly complete coverage of the Soteria API.
- Caching support with customiziable cache implementations.
- Complete type safety with your favorite type checker. 🚀