Small helpers common in most Python applications for OpenTTD
Project description
openttd-helpers
A repository full of small bits of Python code, commonly used in other projects developed for OpenTTD.
To increase maintainability and to decrease code duplication, this repository was created.
Usage
pip install openttd-helpers
See examples/
folder for example use, or look into OpenTTD repositories containing Python code.
Modules
asyncio_helper
Helpers to make the user of ayncio
easier.
- task:
enable_strong_referenced_tasks()
makes returned tasks fromayncio.create_task
strong, so they are not garbage collected unexpectedly.
click_helper
Helpers to make the use of click
easier.
- command: by default, add
-h
to the allowed parameters. - extend: allow extending a
click.command()
in other functions. - import_module: used in combination with
Choice
, to auto-load modules based on the choice.
logging_helper
Setup a default logger via a click.extend()
function.
sentry_helper
Setup Sentry via a click.extend()
function.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openttd-helpers-1.4.0.tar.gz
.
File metadata
- Download URL: openttd-helpers-1.4.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5017880520dab5e4b725dfd0b768cb69da075c3ece9d792cf428ca63bf2cfb1 |
|
MD5 | 914fd3316a4f6eeb51b7b71b48e6f718 |
|
BLAKE2b-256 | 34a2f0ed7162835265523d76f4459fa07a73f3a655227a54aba7e5e49c642ad1 |
File details
Details for the file openttd_helpers-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: openttd_helpers-1.4.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f3db6eacba0f85d98ec96093d739ec1abc992dabb0f0aa8db97bae41a3af9d2 |
|
MD5 | d07342ae6a4961f73546c092f210122f |
|
BLAKE2b-256 | e1a7a0d6838920dc570e1375e6e4d97b167a4fcf2d80041062a315d8ebcdb3ce |