app_global
From docs.python.org:
"The canonical way to share information across modules within a single program is to create a special module (often called config or cfg). Just import the config module in all modules of your application; the module then becomes available as a global name. Because there is only one instance of each module, any changes made to the module object get reflected everywhere. For example:"
See /Example/app_global_test for an illustration that can be run in VSCode
Although not illustrated, it is recommended to categorize data within the app globals to keep organized and thus reduce possiblity obscure failure:
- config.C - For global constants
- config.G - For global application state like DB connections, caches etc.
- config.opts - Application options
- config.log - Application logger
- config.printCli - Common print cli handler for clean exit during initialization
As with any global data, care should be taken when using from within any multi threading applications. Use appropriate locking mechanisms as required.
Besides improving documentation, the main source config.py will be left as an empty source file so that is infinitely flexible
Metadata
Release files for app-global 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| app_global-1.0.0.tar.gz | 2.9 kB | Without provenance | Details for app_global-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| app_global-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for app_global-1.0.0-py3-none-any.whl |
Total release size: 5.8 kB
Release files / app_global-1.0.0.tar.gz
| Download URL | app_global-1.0.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
605461af1ce1ebb92f61fc6d44fd01ec9ccabf52ee734111f8435be05b8cced4
|
|
BLAKE2b-256 checksum How to use checksums |
46e33ca1095c4e0c2b503eb13942dd44ab91cc68f2e0507a87817e9e3777e889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.9 Linux/5.15.0-1035-oracle
|
Release files / app_global-1.0.0-py3-none-any.whl
| Download URL | app_global-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a043e89a8a198ffeee1e3f76514e27444566f52a49307c60079c06e8b660f31d
|
|
BLAKE2b-256 checksum How to use checksums |
dd766f060e89982f57d83b3dcb80071b4a19e5091f916806ebaff5a4a91319fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.9 Linux/5.15.0-1035-oracle
|
Security for app-global 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.