3
1
Fork
You've already forked pyteria
1
A little Soteria API Library written in Python
  • Python 100%
2024年10月29日 17:19:56 -07:00
assets chore: new readme file 2024年08月11日 20:52:44 +03:00
examples Add asset helper class to retrive files (e.g pfps, banners, etc) from the CDN ( #1 ) 2024年08月16日 09:12:41 +00:00
src/soteria feat(User): add limit & offset params for fetch_post & fetch_liked_posts 2024年10月29日 17:19:56 -07: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: add project urls to pyproject.toml 2024年08月16日 23:23:31 +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. 🚀