Skip to main content

Python:

PyPI version fury.io Downloads Downloads Downloads

Support Python Versions

Static Badge Ruff Coverage Status Tests Status

CI/CD Pipeline:

Testing - Main Testing - Dev

SonarCloud:

Coverage Maintainability Rating Quality Gate Status Reliability Rating Vulnerabilities

DevSetGo Common Library

DSG Logo devsetgo_lib is a versatile library designed to provide common functions for Python applications. Its main goal is to increase reusability and reduce the need to rewrite the same functions across multiple applications. This also allows for quick defect resolution and propagation of fixes across all dependent projects.

Read the Full Documentation here.

AI Assistant Integration

Using GitHub Copilot, Claude, or another AI coding assistant to add this library to your app? Generate up-to-date integration instructions directly into your app's repo:

python -m dsg_lib.ai_instructions claude --write    # -> ./CLAUDE.md
python -m dsg_lib.ai_instructions copilot --write   # -> ./.github/copilot-instructions.md
python -m dsg_lib.ai_instructions generic --write   # -> ./AI_INSTRUCTIONS.md

See the AI Assistant Integration docs for details.

Key Features

Common Functions:

  • File Operations:

    • CSV, JSON, and Text File Functions: Create, read, write, and manipulate various file types with ease.
    • Folder Functions: Create and remove directories, list directory contents, and manage file system operations efficiently.
  • File Moving: Move files from one directory to another, with an option to compress the file being moved.

  • Logging: Comprehensive logging setup using the Loguru Library. Provides extensive customization options for log configuration, including log rotation, retention, and formatting. Includes improvements for multiprocessing environments to ensure log messages are handled correctly across multiple processes.

  • Calendar Functions: Convert between month names and numbers seamlessly.

  • Pattern Matching: Powerful tools for searching patterns in text using regular expressions.

FastAPI Endpoints:

  • Pre-built endpoints for system health checks, status, and uptime monitoring.
  • Functions to generate HTTP response codes easily.

Robyn Endpoints:

  • The same robots.txt and system health endpoints as Robyn SubRouters.
  • Secure /heapdump with your own middleware or Robyn's auth_required.

Async Database:

  • Configuration and management of asynchronous database sessions.
  • CRUD operations with async support.

Quick Reference

  • Logging & Config Setup
  • FastAPI Endpoints
  • Robyn Endpoints
  • Calendar & Date Utilities
  • Pattern Matching
  • CSV & JSON Helpers

Installation

To install devsetgo_lib, use pip:

pip install devsetgo-lib

# For async database setup with SQLite, PostgreSQL, or MSSQL
pip install devsetgo-lib[sqlite]
pip install devsetgo-lib[postgres]
pip install devsetgo-lib[mssql]

# Experimental support for other databases
pip install devsetgo-lib[oracle]
pip install devsetgo-lib[mysql]

# For adding FastAPI endpoints
pip install devsetgo-lib[fastapi]

# For adding Robyn endpoints
pip install devsetgo-lib[robyn]

# Install everything
pip install devsetgo-lib[all]

Usage

Here's a quick example to demonstrate how you can use some of the key features of devsetgo_lib:

from devsetgo_lib.common_functions import file_functions, logging_config, patterns, calendar_functions

# File Operations
file_functions.create_sample_files("example", 100)
content = file_functions.read_from_file("example.csv")
print(content)

# Logging
logging_config.config_log(logging_directory='logs', log_name='app.log', logging_level='DEBUG')
logger = logging.getLogger('app_logger')
logger.info("This is an info message")

# Pattern Matching
text = "Hello, my name is 'John Doe' and I live in 'New York'."
results = patterns.pattern_between_two_char(text, "'", "'")
print(results)

# Calendar Functions
print(calendar_functions.get_month(1))  # Output: 'January'
print(calendar_functions.get_month_number('January'))  # Output: 1

For detailed documentation on each module and function, please refer to the official documentation.

Contributing

We welcome contributions! Please see our contributing guidelines for more details.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or issues, please open an issue on GitHub or contact us at devsetgo@example.com.

Metadata

Release files for devsetgo-lib 2026.10.18.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devsetgo-lib 2026.10.18.1
File Size Uploaded Provenance
devsetgo_lib-2026.10.18.1.tar.gz 70.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for devsetgo-lib 2026.10.18.1
File Interpreter ABI Platform
devsetgo_lib-2026.10.18.1-py3-none-any.whl Python 3 none any Details

Total release size: 155.5 kB

Release files / devsetgo_lib-2026.10.18.1.tar.gz

Download URL devsetgo_lib-2026.10.18.1.tar.gz
Size 70.2 kB
Tags Source
SHA-256 checksum
How to use checksums
730f52b7709a2105b1f2e520235cf11d763a154adf382305cebfe5d5e75852e7
BLAKE2b-256 checksum
How to use checksums
7732dc0b8e36607edc4491b4bff99c10299ad4379be9a6e88198c62f0c81519d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / devsetgo_lib-2026.10.18.1-py3-none-any.whl

Download URL devsetgo_lib-2026.10.18.1-py3-none-any.whl
Size 85.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ada40a512dc45a1b3b91680af039bc976a02a496579e2275db630e0d7707cbb
BLAKE2b-256 checksum
How to use checksums
5c9ca2ff3f12b6b7ffeaf90713eac29b4fba996bd87f29dcc9c9bb4617919a1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for devsetgo-lib 2026.10.18.1

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.

Release history Release notifications | RSS feed

This release

2026.10.18.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page