A Python library for common features in application development.
Project description
dtPyAppFramework
dtPyAppFramework is a Python library designed to streamline the development of Python applications by providing common features and abstractions. It promotes good practices, modular design, and ease of use.
Features
- Singleton Management: Simplify the use of singleton classes by automating initialisation with predefined parameters.
- Settings and Configuration: Manage application settings and configurations effortlessly.
- Secrets Management: Securely handle secrets and credentials using local or cloud-based stores like AWS Secrets Manager and Asure KeyVault.
- Application Initialisation: Quickly initialise your Python applications with the
AbstractAppclass, which takes care of common initialisation tasks. - Process Management: Use the
ProcessManagerfor efficient process handling in your applications.
Installation
pip install dtPyAppFramework
Getting Started
AbstractApp Class
The AbstractApp class serves as a base class for creating Python applications. It handles common initialisation tasks and provides a structure for defining command-line arguments and the main application logic.
To create a simple Python application using dtPyAppFramework:
from dtPyAppFramework.application import AbstractApp
from dtPyAppFramework import settings
import logging
class MyApplication(AbstractApp):
def define_args(self, arg_parser):
# Define your command-line arguments here
return
def main(self, args):
logging.info("Running your code")
## Place you own code here that you wish to run
# Initialise and run the application
MyApplication(description="Simple App", version="1.0", short_name="simple_app",
full_name="Simple Application", console_app=True).run()
Features
Now lets take some time to go over the various features that makes dtPyAppFramework such a power library to base your
Python projects of.
Logging
dtPyAppFramework offers flexible logging capabilities, allowing you to configure and manage logs easily.
In addition it offers some pretty cool logging capabilities straight out of the door which requires no setup from you.
Configuration Files
Easily read and manage configuration settings from configurations files.
Configuration files can be set for a specific user or for any user of the application.
Secrets Management
Securely store and retrieve sensitive information with encryption and best practices.
You can store secrets for a specific user or make secrets available to all users of the application.
In addition, you can use the AWS Secrets Management seamlessly within the application alongside the in-built secrets store.
Command Line Arguments
Effortlessly parse and manage command line arguments with support for defining options and accessing them in your code.
Application Directories
Access common resource paths like user storage directories.
Resource Manager
A robust Resource Manager, which is a singleton class named ResourceManager.
License
This project is licensed under the MIT License.
Contact
If you have any questions, bug reports, or feature requests, feel free to contact us.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dtpyappframework-2.4.tar.gz.
File metadata
- Download URL: dtpyappframework-2.4.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28a41084531979e16b473bd60fb0582fadd3b4e94806410820ec95ba39ac3927
|
|
| MD5 |
66b66949eff8ba1158e83b06fa56a68c
|
|
| BLAKE2b-256 |
82f4df0b4db33aba110a8261859ccb83bb4600f17717178b4e7783499896544a
|
Provenance
The following attestation bundles were made for dtpyappframework-2.4.tar.gz:
Publisher:
publish-to-pypi.yml on Digital-Thought/dtPyAppFramework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtpyappframework-2.4.tar.gz -
Subject digest:
28a41084531979e16b473bd60fb0582fadd3b4e94806410820ec95ba39ac3927 - Sigstore transparency entry: 156523517
- Sigstore integration time:
-
Permalink:
Digital-Thought/dtPyAppFramework@1b2b554d4540d4fbe257ed190b39b5f7f6ad4f22 -
Branch / Tag:
refs/tags/2.4 - Owner: https://github.com/Digital-Thought
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@1b2b554d4540d4fbe257ed190b39b5f7f6ad4f22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dtPyAppFramework-2.4-py3-none-any.whl.
File metadata
- Download URL: dtPyAppFramework-2.4-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc482043a710c95e91732d69e4f7e42e8ee0bb479738ec304dc2626bcf82a104
|
|
| MD5 |
b639d497c2681f589385591421a963a8
|
|
| BLAKE2b-256 |
b67b4c24f059aa77aa5171594c4dfbe7287018250b1571b3f8e84a761571f4da
|
Provenance
The following attestation bundles were made for dtPyAppFramework-2.4-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Digital-Thought/dtPyAppFramework
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dtpyappframework-2.4-py3-none-any.whl -
Subject digest:
cc482043a710c95e91732d69e4f7e42e8ee0bb479738ec304dc2626bcf82a104 - Sigstore transparency entry: 156523518
- Sigstore integration time:
-
Permalink:
Digital-Thought/dtPyAppFramework@1b2b554d4540d4fbe257ed190b39b5f7f6ad4f22 -
Branch / Tag:
refs/tags/2.4 - Owner: https://github.com/Digital-Thought
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@1b2b554d4540d4fbe257ed190b39b5f7f6ad4f22 -
Trigger Event:
push
-
Statement type: