Debian Codegraph @

README.md

raw
1 # aiotankerkoenig
2
3 [![GitHub Release][releases-shield]][releases]
4 [![Python Versions][python-versions-shield]][pypi]
5 ![Project Stage][project-stage-shield]
6 ![Project Maintenance][maintenance-shield]
7 [![License][license-shield]](LICENSE.md)
8
9 [![Build Status][build-shield]][build]
10 [![Code Coverage][codecov-shield]][codecov]
11
12 Asynchronous Python client for tankerkoenig.de.
13
14 ## About
15
16 This package allows you to fetch data from tankerkoenig.de.
17
18 ## Installation
19
20 ```bash
21 pip install aiotankerkoenig
22 ```
23
24 ## Usage
25
26 ```python
27 import asyncio
28
29 from aiotankerkoenig import Tankerkoenig
30
31
32 async def main() -> None:
33 """Run the example."""
34 async with Tankerkoenig(api_key="abc123") as tk:
35 station_details = await tk.station_details("12345678-1234-1234-1234-123456789012")
36
37 print(f"Name: {station_details.name}")
38
39
40 if __name__ == "__main__":
41 asyncio.run(main())
42 ```
43
44 ## Changelog & Releases
45
46 This repository keeps a change log using [GitHub's releases][releases]
47 functionality. The format of the log is based on
48 [Keep a Changelog][keepchangelog].
49
50 Releases are based on [Semantic Versioning][semver], and use the format
51 of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented
52 based on the following:
53
54 - `MAJOR`: Incompatible or major changes.
55 - `MINOR`: Backwards-compatible new features and enhancements.
56 - `PATCH`: Backwards-compatible bugfixes and package updates.
57
58 ## Contributing
59
60 This is an active open-source project. I am always open to people who want to
61 use the code or contribute to it.
62
63 Thank you for being involved! :heart_eyes:
64
65 ## Setting up development environment
66
67 This Python project is fully managed using [uv]. But also relies on the use of NodeJS for certain checks during development.
68
69 You need at least:
70
71 - Python 3.11+
72 - [uv][uv-install]
73 - NodeJS 20+ (including NPM)
74
75 To install all packages, including all development requirements:
76
77 ```bash
78 npm install
79 uv sync
80 ```
81
82 As this repository uses the [pre-commit][pre-commit] framework, all changes
83 are linted and tested with each commit. You can run all checks and tests
84 manually, using the following command:
85
86 ```bash
87 uv run pre-commit run --all-files
88 ```
89
90 To run just the Python tests:
91
92 ```bash
93 uv run pytest
94 ```
95
96 ## Authors & contributors
97
98 The content is by [Jan-Philipp Benecke][jpbede].
99
100 For a full list of all authors and contributors,
101 check [the contributor's page][contributors].
102
103 ## License
104
105 MIT License
106
107 Copyright (c) 2024-2025 Jan-Philipp Benecke
108
109 Permission is hereby granted, free of charge, to any person obtaining a copy
110 of this software and associated documentation files (the "Software"), to deal
111 in the Software without restriction, including without limitation the rights
112 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113 copies of the Software, and to permit persons to whom the Software is
114 furnished to do so, subject to the following conditions:
115
116 The above copyright notice and this permission notice shall be included in all
117 copies or substantial portions of the Software.
118
119 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
125 SOFTWARE.
126
127 [build-shield]: https://github.com/jpbede/aiotankerkoenig/actions/workflows/release.yml/badge.svg
128 [build]: https://github.com/jpbede/aiotankerkoenig/actions
129 [codecov-shield]: https://codecov.io/gh/jpbede/aiotankerkoenig/branch/main/graph/badge.svg
130 [codecov]: https://codecov.io/gh/jpbede/aiotankerkoenig
131 [commits-shield]: https://img.shields.io/github/commit-activity/y/jpbede/aiotankerkoenig.svg
132 [commits]: https://github.com/jpbede/aiotankerkoenig/commits/main
133 [contributors]: https://github.com/jpbede/aiotankerkoenig/graphs/contributors
134 [jpbede]: https://github.com/jpbede
135 [keepchangelog]: http://keepachangelog.com/en/1.0.0/
136 [license-shield]: https://img.shields.io/github/license/jpbede/aiotankerkoenig.svg
137 [maintenance-shield]: https://img.shields.io/maintenance/yes/2025.svg
138 [uv]: https://docs.astral.sh/uv/
139 [uv-install]: https://docs.astral.sh/uv/getting-started/installation/
140 [pre-commit]: https://pre-commit.com/
141 [project-stage-shield]: https://img.shields.io/badge/project%20stage-stable-green.svg
142 [python-versions-shield]: https://img.shields.io/pypi/pyversions/aiotankerkoenig
143 [releases-shield]: https://img.shields.io/github/release/jpbede/aiotankerkoenig.svg
144 [releases]: https://github.com/jpbede/aiotankerkoenig/releases
145 [semver]: http://semver.org/spec/v2.0.0.html
146 [pypi]: https://pypi.org/project/aiotankerkoenig/