Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dcsbl/python-fm
Async python library to get basic account information from Flitsmeister
https://github.com/dcsbl/python-fm
Last synced: 16 days ago
JSON representation
Async python library to get basic account information from Flitsmeister
- Host: GitHub
- URL: https://github.com/dcsbl/python-fm
- Owner: DCSBL
- License: apache-2.0
- Created: 2024-06-02T09:44:39.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-01T14:29:13.000Z (3 months ago)
- Last Synced: 2024-10-19T07:15:38.665Z (3 months ago)
- Language: Python
- Homepage:
- Size: 586 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flitsmeister: `python-fm`
Asyncio package to communicate with Flitsmeister
This package is aimed to get basic information about your Flitsmeister account.**❗This is an _unofficial_ repo and is not created, maintained or in any sense linked to Flitsmeister. Use at your own risk!**
# Usage
Instantiate the FM class and access the data.## Installation
```bash
python3 -m pip install python-fm
```## Example
```python
import asyncio
from flitsmeister import FM
from flitsmeister.models import Authasync def main():
async with FM() as api:
auth = await api.login(USERNAME, PASSWORD)# - Persist auth in a file or database
# - Create a new auth object from the persisted dataauth = Auth(session_token=SESSION_TOKEN, access_token=ACCESS_TOKEN)
async with FM(auth=auth) as api:
print(await api.user())
print(await api.statistics())if __name__ == "__main__":
asyncio.run(main())
```# Development and contribution
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Feel free to take a look a the open issues if you like to contribute.
## Requirements
- Python 3.9 or higher
- [Poetry](https://python-poetry.org/docs/#installing-with-pipx)## Installation and setup
```bash
poetry install
poetry shell
pre-commit install
```You can now start developing. The pre-commit hooks will run automatically when you commit your changes. Please note that a failed pre-commit hook will prevent you from committing your changes. This is to make sure that the code is formatted correctly and that the tests pass.