Python:
Support Python Versions
CI/CD Pipeline:
SonarCloud:
DevSetGo Common Library
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. Built for low overhead on the request path: a persistent file handle, background compression of rotated files, safe rotation across forked worker processes, and optional stdout-only output for containers. See the Performance page for measured costs per release.
-
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
/heapdumpwith your own middleware or Robyn'sauth_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.24.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| devsetgo_lib-2026.10.24.1.tar.gz | 76.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devsetgo_lib-2026.10.24.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.5 kB
Release files / devsetgo_lib-2026.10.24.1.tar.gz
| Download URL | devsetgo_lib-2026.10.24.1.tar.gz |
|---|---|
| Size | 76.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7de990929bdb7d94c28f464d145b935ed2833f89ffff8812f030e3e72e93167d
|
|
BLAKE2b-256 checksum How to use checksums |
e23d9d04a4f129fc6eb28db5eb74da33c2bbeb6f8124f4b735450a45c01a2c99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / devsetgo_lib-2026.10.24.1-py3-none-any.whl
| Download URL | devsetgo_lib-2026.10.24.1-py3-none-any.whl |
|---|---|
| Size | 91.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bae197b881f975b4ea796bd079e1821e97108dd1be13ea4edea08244662570ed
|
|
BLAKE2b-256 checksum How to use checksums |
58c3f340fa1cc7dfe310cdea89fab63ddf7428c7bab846d418048384cde87cf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for devsetgo-lib 2026.10.24.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.