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.

Async Database:

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

Quick Reference

  • Logging & Config Setup
  • FastAPI 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]

# 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.9.26.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.9.26.1
File Size Uploaded
devsetgo_lib-2026.9.26.1.tar.gz 65.7 kB Details

Built distribution (wheel)

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

Total release size: 141.8 kB

Release files / devsetgo_lib-2026.9.26.1.tar.gz

Download URL devsetgo_lib-2026.9.26.1.tar.gz
Size 65.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6a7580295b7f0c2f912ec671f392448008c5a5b436f204451458052c68887c17
BLAKE2b-256 checksum
How to use checksums
53f2c6b326a977ccb08c561e9ae9f4179883d72e3f05ab5943a689c8ab44efde
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.9.26.1-py3-none-any.whl

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

Release history Release notifications | RSS feed

This release

2026.9.26.1 This release

2 release files

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

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