https://github.com/liberatti/nxcore
Internal Python library designed to provide common and reusable functionalities for private web projects. It streamlines development by offering a robust set of tools for authentication, database integration, messaging, and AI-powered tasks.
https://github.com/liberatti/nxcore
library python3
Last synced: about 1 month ago
JSON representation
Internal Python library designed to provide common and reusable functionalities for private web projects. It streamlines development by offering a robust set of tools for authentication, database integration, messaging, and AI-powered tasks.
- Host: GitHub
- URL: https://github.com/liberatti/nxcore
- Owner: liberatti
- License: apache-2.0
- Created: 2026-04-27T17:48:24.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-28T01:57:25.000Z (2 months ago)
- Last Synced: 2026-04-28T02:35:05.880Z (2 months ago)
- Topics: library, python3
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nxcore
[](https://github.com/liberatti/nxcore)
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.python.org/downloads/)
Internal Python library designed to provide common and reusable functionalities for private web projects. It streamlines development by offering a robust set of tools for authentication, database integration, messaging, and AI-powered tasks.
## 🚀 Key Features
- **🔐 Auth & Security**: Full JWT integration for authentication and authority-based authorization.
- **🍃 MongoDB Integration**: Simplified DAO (Data Access Object) with built-in pagination and schema validation.
- **🐰 RabbitMQ & Messaging**: Easy-to-use wrappers for asynchronous task handling.
- **📦 Cloud Storage**: Seamless integration with MinIO for object storage.
- **🛡️ OAuth Support**: Pre-configured handlers for Google and Microsoft authentication.
- **👁️ Computer Vision**: Facial recognition powered by DeepFace and advanced image processing utilities.
- **🛠️ Common Utilities**: A collection of helpers for deep merging, date formatting, and more.
## 🛠️ Installation
Install the library in editable mode for development:
```bash
pip install -e . --break-system-packages
```
To install specific extras:
```bash
pip install "nxcore[web,mongo,image]"
```
## 📖 Quick Start
### Basic Controller & Auth
```python
from nxcore.controllers.base_controller import has_any_authority, response_data
@has_any_authority(["ROLE_ADMIN"])
def get_user_profile(user_id):
# Logic to fetch user
user = {"id": user_id, "name": "John Doe"}
return response_data(user)
```
### MongoDB DAO
```python
from nxcore.repository.mongo import MongoDAO
class UserDAO(MongoDAO):
def __init__(self, url):
super().__init__(url, collection_name="users")
with UserDAO(mongo_url) as dao:
users = dao.get_all(pagination={"page": 1, "per_page": 10})
```
## 📂 Project Structure
- `nxcore/controllers/`: Base controllers and response helpers.
- `nxcore/middleware/`: JWT handling, logging, and socket management.
- `nxcore/repository/`: Data access tools for MongoDB, RabbitMQ, and MinIO.
- `nxcore/tools/`: Integration with OAuth providers, DeepFace, and image processing.
- `nxcore/common_utils.py`: General purpose utility functions.
- `nxcore/config.py`: Centralized configuration management.
## 🤝 Contribution
This is an internal library. For contributions, please follow the internal development workflow:
1. Create a feature branch.
2. Ensure all methods are documented.
3. Submit a Pull Request.
## ✍️ Author
**Gustavo Liberatti**
- Email: [liberatti.gustavo@gmail.com](mailto:liberatti.gustavo@gmail.com)
- GitHub: [@liberatti](https://github.com/liberatti)
## 📜 License
Distributed under the Apache License 2.0. See `LICENSE` for more information.