Skip to main content

A Python library for common features in application development.

Project description

dtPyAppFramework

License

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 AbstractApp class, which takes care of common initialisation tasks.
  • Process Management: Use the ProcessManager for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dtpyappframework-2.3.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtPyAppFramework-2.3-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file dtpyappframework-2.3.tar.gz.

File metadata

  • Download URL: dtpyappframework-2.3.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dtpyappframework-2.3.tar.gz
Algorithm Hash digest
SHA256 ed9a96b0f141f980d6d502a5384bbcb46ba9c3f488d1982930beb2cc36d8bbe9
MD5 4fffffca642f87bb9215dd5a475b6c76
BLAKE2b-256 104fcd53343dc0519b5bb072445a328e18b8c13da66e24942d64ac4af6e86a28

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtpyappframework-2.3.tar.gz:

Publisher: publish-to-pypi.yml on Digital-Thought/dtPyAppFramework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtPyAppFramework-2.3-py3-none-any.whl.

File metadata

  • Download URL: dtPyAppFramework-2.3-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dtPyAppFramework-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d93f4f0a8e5755deb0983dd503ba1a5b7c804fcfd6005ee8316fb13948ff65a0
MD5 eeffef690e8c84fbf810ccac344d19c4
BLAKE2b-256 6b9dce3fa256b1583c72332eaae1f5a24ce5c30cebfa691bdebed26a1d4bb911

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtPyAppFramework-2.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Digital-Thought/dtPyAppFramework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page