Name | devsetgo-lib JSON |
Version |
0.14.4
JSON |
| download |
home_page | None |
Summary | DevSetGo Library is a Python library offering reusable functions for efficient coding. It includes file operations, calendar utilities, pattern matching, advanced logging with loguru, FastAPI endpoints, async database handling, and email validation. Designed for ease of use and versatility, it's a valuable tool for Python developers. |
upload_time | 2024-09-15 19:28:52 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2020 Mike Ryan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
crud operations
fastapi
async database
calendar utilities
development tools
email validation
file operations
library
logging
loguru
pattern matching
python
reusable functions
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Python:
[![PyPI version fury.io](https://badge.fury.io/py/devsetgo-lib.svg)](https://pypi.python.org/pypi/devsetgo-lib/)
[![Downloads](https://static.pepy.tech/badge/devsetgo-lib)](https://pepy.tech/project/devsetgo-lib)
[![Downloads](https://static.pepy.tech/badge/devsetgo-lib/month)](https://pepy.tech/project/devsetgo-lib)
[![Downloads](https://static.pepy.tech/badge/devsetgo-lib/week)](https://pepy.tech/project/devsetgo-lib)
Support Python Versions
![Static Badge](https://img.shields.io/badge/Python-3.12%20%7C%203.11%20%7C%203.10%20%7C%203.9-blue)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
CI/CD Pipeline:
[![Testing - Main](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml)
[![Testing - Dev](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml/badge.svg?branch=dev)](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml)
SonarCloud:
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=coverage)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=alert_status)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
# 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.
## 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.
- **Logging**:
Comprehensive logging setup using the [Loguru Library]('https://loguru.readthedocs.io/en/stable/overview.html'). 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.
---
## Installation
To install `devsetgo_lib`, use pip:
```sh
pip install devsetgo-lib
# For async database setup with SQLite or PostgreSQL
pip install devsetgo-lib[sqlite]
pip install devsetgo-lib[postgres]
# Experimental support for other databases
pip install devsetgo-lib[oracle]
pip install devsetgo-lib[mssql]
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`:
```python
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](https://devsetgo.github.io/devsetgo_lib/print_page/).
## Contributing
We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
## Contact
For any questions or issues, please open an issue on GitHub or contact us at [devsetgo@example.com](mailto:devsetgo@example.com).
Raw data
{
"_id": null,
"home_page": null,
"name": "devsetgo-lib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Mike Ryan <mikeryan56@gmail.com>",
"keywords": "CRUD operations, FastAPI, async database, calendar utilities, development tools, email validation, file operations, library, logging, loguru, pattern matching, python, reusable functions",
"author": null,
"author_email": "Mike Ryan <mikeryan56@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a8/fc/7040a7d6fc2ced96f83913eaff42f067736b2081a1213e5120e666b279e5/devsetgo_lib-0.14.4.tar.gz",
"platform": null,
"description": "Python:\n\n[![PyPI version fury.io](https://badge.fury.io/py/devsetgo-lib.svg)](https://pypi.python.org/pypi/devsetgo-lib/)\n[![Downloads](https://static.pepy.tech/badge/devsetgo-lib)](https://pepy.tech/project/devsetgo-lib)\n[![Downloads](https://static.pepy.tech/badge/devsetgo-lib/month)](https://pepy.tech/project/devsetgo-lib)\n[![Downloads](https://static.pepy.tech/badge/devsetgo-lib/week)](https://pepy.tech/project/devsetgo-lib)\n\nSupport Python Versions\n\n![Static Badge](https://img.shields.io/badge/Python-3.12%20%7C%203.11%20%7C%203.10%20%7C%203.9-blue)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nCI/CD Pipeline:\n\n[![Testing - Main](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml)\n[![Testing - Dev](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml/badge.svg?branch=dev)](https://github.com/devsetgo/devsetgo_lib/actions/workflows/testing.yml)\n\nSonarCloud:\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=coverage)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=alert_status)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)\n\n\n\n# DevSetGo Common Library\n\n`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.\n\n## Key Features\n\n### **Common Functions**:\n - **File Operations**:\n - **CSV, JSON, and Text File Functions**: Create, read, write, and manipulate various file types with ease.\n - **Folder Functions**: Create and remove directories, list directory contents, and manage file system operations efficiently.\n\n - **Logging**:\n Comprehensive logging setup using the [Loguru Library]('https://loguru.readthedocs.io/en/stable/overview.html'). 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.\n\n - **Calendar Functions**:\n Convert between month names and numbers seamlessly.\n\n - **Pattern Matching**:\n Powerful tools for searching patterns in text using regular expressions.\n\n\n### **FastAPI Endpoints**:\n - Pre-built endpoints for system health checks, status, and uptime monitoring.\n - Functions to generate HTTP response codes easily.\n\n### **Async Database**:\n - Configuration and management of asynchronous database sessions.\n - CRUD operations with async support.\n\n---\n## Installation\n\nTo install `devsetgo_lib`, use pip:\n\n```sh\npip install devsetgo-lib\n\n# For async database setup with SQLite or PostgreSQL\npip install devsetgo-lib[sqlite]\npip install devsetgo-lib[postgres]\n\n# Experimental support for other databases\npip install devsetgo-lib[oracle]\npip install devsetgo-lib[mssql]\npip install devsetgo-lib[mysql]\n\n# For adding FastAPI endpoints\npip install devsetgo-lib[fastapi]\n\n# Install everything\npip install devsetgo-lib[all]\n```\n\n## Usage\n\nHere's a quick example to demonstrate how you can use some of the key features of `devsetgo_lib`:\n\n```python\nfrom devsetgo_lib.common_functions import file_functions, logging_config, patterns, calendar_functions\n\n# File Operations\nfile_functions.create_sample_files(\"example\", 100)\ncontent = file_functions.read_from_file(\"example.csv\")\nprint(content)\n\n# Logging\nlogging_config.config_log(logging_directory='logs', log_name='app.log', logging_level='DEBUG')\nlogger = logging.getLogger('app_logger')\nlogger.info(\"This is an info message\")\n\n# Pattern Matching\ntext = \"Hello, my name is 'John Doe' and I live in 'New York'.\"\nresults = patterns.pattern_between_two_char(text, \"'\", \"'\")\nprint(results)\n\n# Calendar Functions\nprint(calendar_functions.get_month(1)) # Output: 'January'\nprint(calendar_functions.get_month_number('January')) # Output: 1\n```\n\nFor detailed documentation on each module and function, please refer to the [official documentation](https://devsetgo.github.io/devsetgo_lib/print_page/).\n\n## Contributing\n\nWe welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## Contact\n\nFor any questions or issues, please open an issue on GitHub or contact us at [devsetgo@example.com](mailto:devsetgo@example.com).\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2020 Mike Ryan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "DevSetGo Library is a Python library offering reusable functions for efficient coding. It includes file operations, calendar utilities, pattern matching, advanced logging with loguru, FastAPI endpoints, async database handling, and email validation. Designed for ease of use and versatility, it's a valuable tool for Python developers.",
"version": "0.14.4",
"project_urls": {
"Documentation": "https://devsetgo.github.io/devsetgo_lib/",
"Homepage": "https://github.com/devsetgo/devsetgo_lib",
"Repository": "https://github.com/devsetgo/devsetgo_lib"
},
"split_keywords": [
"crud operations",
" fastapi",
" async database",
" calendar utilities",
" development tools",
" email validation",
" file operations",
" library",
" logging",
" loguru",
" pattern matching",
" python",
" reusable functions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "be7170e4ce883161e051f070adeaad1e3c03a15d3cf4b35093e8d1088aabaeb5",
"md5": "263a7b43d31147f8aa1d628f1b676d09",
"sha256": "dcc1d6491936855aaf8c11fe1fe3d1b47e955b2694c1bddfd0697efffd55b191"
},
"downloads": -1,
"filename": "devsetgo_lib-0.14.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "263a7b43d31147f8aa1d628f1b676d09",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 49644,
"upload_time": "2024-09-15T19:28:50",
"upload_time_iso_8601": "2024-09-15T19:28:50.844934Z",
"url": "https://files.pythonhosted.org/packages/be/71/70e4ce883161e051f070adeaad1e3c03a15d3cf4b35093e8d1088aabaeb5/devsetgo_lib-0.14.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a8fc7040a7d6fc2ced96f83913eaff42f067736b2081a1213e5120e666b279e5",
"md5": "4a5549d98fc6876b139f23a5e079f6f5",
"sha256": "445333573a0b077f03e7516ed44b0db337e74ebc5cb9dd5a0c2d90f59c9a88da"
},
"downloads": -1,
"filename": "devsetgo_lib-0.14.4.tar.gz",
"has_sig": false,
"md5_digest": "4a5549d98fc6876b139f23a5e079f6f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 41404,
"upload_time": "2024-09-15T19:28:52",
"upload_time_iso_8601": "2024-09-15T19:28:52.530021Z",
"url": "https://files.pythonhosted.org/packages/a8/fc/7040a7d6fc2ced96f83913eaff42f067736b2081a1213e5120e666b279e5/devsetgo_lib-0.14.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-15 19:28:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "devsetgo",
"github_project": "devsetgo_lib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "devsetgo-lib"
}