Metadata-Version: 2.1
Name: python-fm
Version: 1.0.0b1
Summary: Asynchronous Python client for Flitsmeister
Home-page: https://github.com/DCSBL/python-flitsmeister
License: Apache-2.0
Author: DCSBL
Maintainer: DCSBL
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: aiohttp (>=3.0.0)
Requires-Dist: async-timeout (>=4.0.3,<5.0.0)
Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
Project-URL: Bug Tracker, https://github.com/DCSBL/python-flitsmeister/issues
Project-URL: Changelog, https://github.com/DCSBL/python-flitsmeister/releases
Project-URL: Documentation, https://github.com/DCSBL/python-flitsmeister
Project-URL: Repository, https://github.com/DCSBL/python-flitsmeister
Description-Content-Type: text/markdown

# 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 Auth

async 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 data

    auth = 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.

