1
0
Fork
You've already forked pyteria
0
forked from soteria/pyteria
A little Soteria API Library written in Python
  • Python 100%
2024年08月16日 00:45:48 +01:00
assets chore: new readme file 2024年08月11日 20:52:44 +03:00
examples docs: add examples script 2024年08月15日 16:25:34 +01:00
src/soteria refactor: move Asset to models 2024年08月16日 00:45:48 +01:00
.gitignore style: lint 2024年08月09日 12:25:01 +03:00
.pre-commit-config.yaml style: lint 2024年08月09日 12:25:01 +03:00
LICENSE Initial commit 2024年06月21日 17:24:04 +00:00
pdm.lock chore: add linters & pre-commit 2024年08月09日 12:22:02 +03:00
pyproject.toml chore: update pyproject 2024年08月11日 21:32:37 +03:00
README.md chore: new readme file 2024年08月11日 20:52:44 +03:00


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. 🚀