Skip to content

Commit

Permalink
Add example to README.md (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Jan 25, 2024
1 parent 7b6a10b commit a372ae3
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ This package allows you to fetch data from tankerkoenig.de.
```bash
pip install aiotankerkoenig
```
## Usage

```python
import asyncio

from aiotankerkoenig import Tankerkoenig


async def main() -> None:
"""Run the example."""
async with Tankerkoenig(api_key="abc123") as tk:
station_details = await tk.station_details("12345678-1234-1234-1234-123456789012")

print(f"Name: {station_details.name}")


if __name__ == "__main__":
asyncio.run(main())
```


## Changelog & Releases

Expand Down Expand Up @@ -106,7 +126,7 @@ SOFTWARE.

[build-shield]: https://github.com/jpbede/aiotankerkoenig/actions/workflows/release.yml/badge.svg
[build]: https://github.com/jpbede/aiotankerkoenig/actions
[codecov-shield]: https://codecov.io/gh/jpbede/aiotankerkoenig/branch/master/graph/badge.svg
[codecov-shield]: https://codecov.io/gh/jpbede/aiotankerkoenig/branch/main/graph/badge.svg
[codecov]: https://codecov.io/gh/jpbede/aiotankerkoenig
[commits-shield]: https://img.shields.io/github/commit-activity/y/jpbede/aiotankerkoenig.svg
[commits]: https://github.com/jpbede/aiotankerkoenig/commits/main
Expand Down

0 comments on commit a372ae3

Please sign in to comment.