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-1.5.1.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

dtPyAppFramework-1.5.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dtpyappframework-1.5.1.tar.gz
Algorithm Hash digest
SHA256 f3eb7a06ded6c6ec105f3e30fbab44d21d7265decc3c41cbc07e20af5a9ad25d
MD5 876388122c275c821deb76a0dc9a76f5
BLAKE2b-256 b2ba27b47501bf6b21842ca9abca59aebd2c4b5cf2f2a187f8083c2b89626995

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dtPyAppFramework-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53aad619be8d96f175dbddade1b1832ee9560d325f01ff2139373f921935879d
MD5 3b0ec0ea13a25efc33dd689f7f8485e5
BLAKE2b-256 fbe2dbc32eb189523c12616839703dc3ed614575d2179c2b878e7eb13fda5501

See more details on using hashes here.

Supported by

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