Skip to content

Commit 3a3294f

Browse files
committed
updating documentation.
1 parent 365ab4c commit 3a3294f

File tree

2 files changed

+127
-96
lines changed

2 files changed

+127
-96
lines changed

README.md

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -30,57 +30,43 @@ SonarCloud:
3030

3131
# DevSetGo Common Library
3232

33-
## Introduction
34-
The DevSetGo Common Library is a comprehensive package of common functions designed to eliminate repetitive coding and enhance code reusability. It aims to save developers time and effort across various projects.
35-
36-
## Compatibility and Testing
37-
- **Tested on**: Windows, Linux.
38-
- **Compatibility**: Potentially compatible with MacOS (feedback on issues is appreciated).
39-
40-
## Library Functions
41-
### Common Functions
42-
- **File Functions**:
43-
- CSV File Functions
44-
- JSON File Functions
45-
- Text File Functions
46-
- **Folder Functions**:
47-
- Make Directory
48-
- Remove Directory
49-
- Last File Changed
50-
- Directory List
51-
- **Calendar Functions**:
52-
- Get Month
53-
- Get Month Number
54-
- **Patterns**:
55-
- Pattern Between Two Characters
33+
`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.
34+
35+
## Key Features
36+
37+
- **File Operations**:
38+
- **CSV, JSON, and Text File Functions**: Create, read, write, and manipulate various file types with ease.
39+
- **Folder Functions**: Create and remove directories, list directory contents, and manage file system operations efficiently.
40+
5641
- **Logging**:
57-
- Logging configuration and interceptor
42+
- Comprehensive logging setup using the `loguru` library. Provides extensive customization options for log configuration, including log rotation, retention, and formatting.
5843

59-
### FastAPI Endpoints
60-
- **Systems Health Endpoints**:
61-
- Status/Health, Heapdump, Uptime
62-
- **HTTP Codes**:
63-
- Method to generate HTTP response codes
44+
- **Calendar Functions**:
45+
- Convert between month names and numbers seamlessly.
6446

65-
### Async Database
66-
- Database Config
67-
- Async Session
68-
- CRUD Operations
47+
- **Pattern Matching**:
48+
- Powerful tools for searching patterns in text using regular expressions.
6949

70-
## Examples and Usage
71-
Refer to the [Recipes Pages](https://devsetgo.github.io/devsetgo_lib/recipes/fastapi/)
50+
- **FastAPI Endpoints**:
51+
- Pre-built endpoints for system health checks, status, and uptime monitoring.
52+
- Functions to generate HTTP response codes easily.
7253

73-
## Installation Guide
74-
[Quick Start](https://devsetgo.github.io/devsetgo_lib/quickstart/)
54+
- **Async Database**:
55+
- Configuration and management of asynchronous database sessions.
56+
- CRUD operations with async support.
7557

76-
```python
58+
## Installation
59+
60+
To install `devsetgo_lib`, use pip:
61+
62+
```sh
7763
pip install devsetgo-lib
7864

79-
# Aysync database setup
65+
# For async database setup with SQLite or PostgreSQL
8066
pip install devsetgo-lib[sqlite]
8167
pip install devsetgo-lib[postgres]
8268

83-
# Consider these experimental and untested
69+
# Experimental support for other databases
8470
pip install devsetgo-lib[oracle]
8571
pip install devsetgo-lib[mssql]
8672
pip install devsetgo-lib[mysql]
@@ -92,15 +78,43 @@ pip install devsetgo-lib[fastapi]
9278
pip install devsetgo-lib[all]
9379
```
9480

81+
## Usage
9582

96-
## Contribution and Feedback
97-
Contributions and feedback are highly appreciated. Please refer to our [Contribution Guidelines](https://github.com/devsetgo/devsetgo_lib/blob/main/CONTRIBUTING.md).
83+
Here's a quick example to demonstrate how you can use some of the key features of `devsetgo_lib`:
84+
85+
```python
86+
from devsetgo_lib import file_functions, logging_config, patterns, calendar_functions
87+
88+
# File Operations
89+
file_functions.create_sample_files("example", 100)
90+
content = file_functions.read_from_file("example.csv")
91+
print(content)
92+
93+
# Logging
94+
logging_config.config_log(logging_directory='logs', log_name='app.log', logging_level='DEBUG')
95+
logger = logging.getLogger('app_logger')
96+
logger.info("This is an info message")
97+
98+
# Pattern Matching
99+
text = "Hello, my name is 'John Doe' and I live in 'New York'."
100+
results = patterns.pattern_between_two_char(text, "'", "'")
101+
print(results)
102+
103+
# Calendar Functions
104+
print(calendar_functions.get_month(1)) # Output: 'January'
105+
print(calendar_functions.get_month_number('January')) # Output: 1
106+
```
107+
108+
For detailed documentation on each module and function, please refer to the [official documentation](https://devsetgo.github.io/devsetgo_lib/print_page/).
109+
110+
## Contributing
111+
112+
We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.
98113

99114
## License
100-
[MIT Licensed](https://github.com/devsetgo/devsetgo_lib/blob/main/LICENSE)
101115

102-
## Author Information
103-
[Mike Ryan](https://github.com/devsetgo)
116+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
117+
118+
## Contact
104119

105-
## Further Documentation
106-
For more detailed information, visit [LINK_TO_DETAILED_DOCUMENTATION](https://devsetgo.github.io/devsetgo_lib/).
120+
For any questions or issues, please open an issue on GitHub or contact us at [devsetgo@example.com](mailto:devsetgo@example.com).

docs/index.md

Lines changed: 66 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CI/CD Pipeline:
1515

1616
[![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)
1717
[![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)
18-
[![Coverage fury.io](coverage-badge.svg)](https://github.com/devsetgo/dsg_lib)
18+
1919

2020
SonarCloud:
2121

@@ -26,62 +26,47 @@ SonarCloud:
2626
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
2727
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=devsetgo_devsetgo_lib&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=devsetgo_devsetgo_lib)
2828

29-
![Static Badge](https://img.shields.io/badge/Documentation-v0.12.2-blue?link=https%3A%2F%2Fdevsetgo.github.io%2Fdevsetgo_lib)
3029

3130

3231
# DevSetGo Common Library
3332

34-
## Introduction
35-
The DevSetGo Common Library is a comprehensive package of common functions designed to eliminate repetitive coding and enhance code reusability. It aims to save developers time and effort across various projects.
36-
37-
## Compatibility and Testing
38-
- **Tested on**: Windows, Linux.
39-
- **Compatibility**: Potentially compatible with MacOS (feedback on issues is appreciated).
40-
41-
## Library Functions
42-
### Common Functions
43-
- **File Functions**:
44-
- CSV File Functions
45-
- JSON File Functions
46-
- Text File Functions
47-
- **Folder Functions**:
48-
- Make Directory
49-
- Remove Directory
50-
- Last File Changed
51-
- Directory List
52-
- **Calendar Functions**:
53-
- Get Month
54-
- Get Month Number
55-
- **Patterns**:
56-
- Pattern Between Two Characters
33+
`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.
34+
35+
## Key Features
36+
37+
- **File Operations**:
38+
- **CSV, JSON, and Text File Functions**: Create, read, write, and manipulate various file types with ease.
39+
- **Folder Functions**: Create and remove directories, list directory contents, and manage file system operations efficiently.
40+
5741
- **Logging**:
58-
- Logging configuration and interceptor
42+
- Comprehensive logging setup using the `loguru` library. Provides extensive customization options for log configuration, including log rotation, retention, and formatting.
5943

60-
### FastAPI Endpoints
61-
- **Systems Health Endpoints**:
62-
- Status/Health, Heapdump, Uptime
63-
- **HTTP Codes**:
64-
- Method to generate HTTP response codes
44+
- **Calendar Functions**:
45+
- Convert between month names and numbers seamlessly.
6546

66-
### Async Database
67-
- Database Config
68-
- Async Session
69-
- CRUD Operations
47+
- **Pattern Matching**:
48+
- Powerful tools for searching patterns in text using regular expressions.
7049

71-
## Examples and Usage
72-
Refer to the [Recipes Pages](https://devsetgo.github.io/devsetgo_lib/recipes/fastapi/)
50+
- **FastAPI Endpoints**:
51+
- Pre-built endpoints for system health checks, status, and uptime monitoring.
52+
- Functions to generate HTTP response codes easily.
7353

74-
## Installation Guide
75-
[Quick Start](https://devsetgo.github.io/devsetgo_lib/quickstart/)
54+
- **Async Database**:
55+
- Configuration and management of asynchronous database sessions.
56+
- CRUD operations with async support.
7657

77-
```python
58+
## Installation
59+
60+
To install `devsetgo_lib`, use pip:
61+
62+
```sh
7863
pip install devsetgo-lib
7964

80-
# Aysync database setup
65+
# For async database setup with SQLite or PostgreSQL
8166
pip install devsetgo-lib[sqlite]
8267
pip install devsetgo-lib[postgres]
8368

84-
# Consider these experimental and untested
69+
# Experimental support for other databases
8570
pip install devsetgo-lib[oracle]
8671
pip install devsetgo-lib[mssql]
8772
pip install devsetgo-lib[mysql]
@@ -93,15 +78,47 @@ pip install devsetgo-lib[fastapi]
9378
pip install devsetgo-lib[all]
9479
```
9580

81+
## Usage
9682

97-
## Contribution and Feedback
98-
Contributions and feedback are highly appreciated. Please refer to our [Contribution Guidelines](https://github.com/devsetgo/devsetgo_lib/blob/main/CONTRIBUTING.md).
83+
Here's a quick example to demonstrate how you can use some of the key features of `devsetgo_lib`:
84+
85+
```python
86+
from devsetgo_lib import file_functions, logging_config, patterns, calendar_functions
87+
88+
# File Operations
89+
file_functions.create_sample_files("example", 100)
90+
content = file_functions.read_from_file("example.csv")
91+
print(content)
92+
93+
# Logging
94+
logging_config.config_log(logging_directory='logs', log_name='app.log', logging_level='DEBUG')
95+
logger = logging.getLogger('app_logger')
96+
logger.info("This is an info message")
97+
98+
# Pattern Matching
99+
text = "Hello, my name is 'John Doe' and I live in 'New York'."
100+
results = patterns.pattern_between_two_char(text, "'", "'")
101+
print(results)
102+
103+
# Calendar Functions
104+
print(calendar_functions.get_month(1)) # Output: 'January'
105+
print(calendar_functions.get_month_number('January')) # Output: 1
106+
```
107+
108+
For detailed documentation on each module and function, please refer to the [official documentation](https://devsetgo.github.io/devsetgo_lib/print_page/).
109+
110+
## Contributing
111+
112+
We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.
99113

100114
## License
101-
[MIT Licensed](https://github.com/devsetgo/devsetgo_lib/blob/main/LICENSE)
102115

103-
## Author Information
104-
[Mike Ryan](https://github.com/devsetgo)
116+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
117+
118+
## Contact
119+
120+
For any questions or issues, please open an issue on GitHub or contact us at [devsetgo@example.com](mailto:devsetgo@example.com).
121+
122+
---
105123

106-
## Further Documentation
107-
For more detailed information, visit [LINK_TO_DETAILED_DOCUMENTATION](https://devsetgo.github.io/devsetgo_lib/).
124+
This updated README provides a clear and concise overview of the library's capabilities and how to get started with it. Feel free to adjust the example code and other details as needed to better fit your library's specific features.

0 commit comments

Comments
 (0)