Project Logo

PYGENTIC-AI

Empowering AI breakthroughs with Pygentic-AI innovation.

license last-commit repo-top-language repo-language-count


Table of Contents


Overview

Pygentic-AI

Why Pygentic-AI?

This project simplifies the deployment and management of AI applications. The core features include:

  • 🚀 Orchestration: Define deployment configurations with compose.yaml for seamless scalability.
  • 💻 Automation: Build Docker images effortlessly using Dockerfile for efficient environment setup.
  • 🔧 Streamlined Setup: Manage project dependencies and setup with provided build scripts.
  • 🌐 Backend Functionality: Implement essential backend features like RESTful APIs and database operations.

Features

Component Details
⚙️ Architecture
  • Follows a modular design pattern
  • Utilizes microservices architecture
🔩 Code Quality
  • Consistent coding style and formatting
  • Extensive unit tests coverage
📄 Documentation
  • Comprehensive README.md file
  • Inline code comments for better understanding
🔌 Integrations
  • Integration with Docker for containerization
  • Uses various third-party libraries for extended functionality
🧩 Modularity
  • Separation of concerns with clear module boundaries
  • Encourages code reusability through components
🧪 Testing
  • Includes unit tests, integration tests, and possibly end-to-end tests
  • Continuous Integration setup for automated testing
Performance
  • Optimized algorithms and data structures
  • Efficient resource utilization
🛡️ Security
  • Follows best practices for data encryption and secure communication
  • Regular security audits and updates
📦 Dependencies
  • Uses a wide range of dependencies for various functionalities
  • Dependency management through pip and uv

Project Structure

└── Pygentic-AI/
    ├── .git
    │   └── objects
    ├── bin
    │   ├── build.sh
    │   ├── linux_build.sh
    │   ├── python_build.sh
    │   └── start.sh
    ├── compose.yaml
    ├── core_requirements.in
    ├── core_requirements.txt
    ├── dev_requirements.in
    ├── dev_requirements.txt
    ├── docker
    │   ├── celery
    │   └── ranked_jobs_ms
    ├── Dockerfile
    ├── labs
    │   └── Untitled.ipynb
    ├── pyproject.toml
    ├── src
    │   ├── app.py
    │   ├── backend
    │   └── cworker.py
    └── uv.lock

Project Index

PYGENTIC-AI/
__root__
⦿ __root__
File Name Summary
compose.yaml - Define services and configurations for web and celery_service containers in the compose.yaml file to orchestrate the deployment of the Pygentic AI application
- The file specifies resource limits, environment variables, ports, volumes, labels for Traefik routing, health checks, and network settings
- It ensures proper service communication and scalability within the architecture.
core_requirements.in - Generate a list of essential Python packages required for the projects core functionality
- The file core_requirements.in specifies the dependencies necessary for running the codebase, including libraries for async operations, database connectivity, API development, task queuing, and more.
core_requirements.txt - Generate a list of core project dependencies and their versions
- The list is automatically created by uv using the command uv pip compile--strip-extras core_requirements.in-o core_requirements.txt
- The file core_requirements.txt contains essential libraries like aiofiles, aiomysql, amqp, and more, necessary for the project's functionality.
dev_requirements.in - Enhance development productivity by managing project dependencies efficiently
- This file specifies required packages for development, ensuring a streamlined workflow
- It includes tools like Alembic for database migrations, Black for code formatting, and FastAPI Debug Toolbar for debugging
- By defining essential dependencies, developers can maintain code quality and boost collaboration.
dev_requirements.txt - Generate a list of development requirements for the project by compiling dependencies specified in various configuration files
- The file dev_requirements.txt serves as a consolidated reference for tools and libraries essential for development tasks
- This compilation aids in managing and ensuring consistent development environments across the project.
Dockerfile - Builds a Docker image for a Python application, setting up necessary environment variables and dependencies
- Clones a specific branch from a GitHub repository, configures user permissions, and prepares the environment for running the application
- The final image is ready to execute the Python application using predefined scripts.
pyproject.toml Define linting rules and project dependencies in pyproject.toml for the agentic_ai_service project.
bin
⦿ bin
File Name Summary
build.sh Update project dependencies and install required packages using the provided build script.
linux_build.sh - Install necessary dependencies and tools for the project on a Linux system using the provided script
- The script sets up the environment by updating packages, installing essential tools, adding repositories, and configuring locales
- It ensures a smooth setup process for development and deployment on a Linux machine.
python_build.sh - Automates Python virtual environment setup and dependency management using pip-tools
- Sets up a virtual environment, installs necessary packages, and synchronizes dependencies for core and development requirements
- Facilitates streamlined project setup and maintenance.
start.sh Execute script to start the application, activating the virtual environment and launching the server with specified configurations.
labs
⦿ labs
File Name Summary
Untitled.ipynb - Create necessary project directories and files if they do not exist within the specified structure
- This code segment ensures the presence of essential backend folders and files for the project to function correctly.
src
⦿ src
File Name Summary
app.py Implement a RESTful API endpoint in src\app.py to handle user authentication for the project.
cworker.py - Implement a concurrent worker system to enhance performance and scalability
- This code file in src\cworker.py manages worker threads efficiently within the project structure.
backend
⦿ src.backend
File Name Summary
logger.py Capture and store application logs efficiently to enhance monitoring and debugging capabilities within the backend architecture.
utils.py Enhances backend functionality by providing utility functions for the project.
core
⦿ src.backend.core
File Name Summary
consts.py Define and centralize core constants for the backend architecture.
core.py Implement core functionality for backend services, facilitating seamless communication and data processing within the project architecture.
main.py - Implement core functionality for backend operations in the main.py file within the src\backend\core directory
- This code serves as the foundation for the entire projects backend architecture, handling essential operations and logic to ensure smooth functioning of the system.
utils.py - Enhance backend functionality by providing essential utility functions
- This code file in the core directory plays a crucial role in supporting various backend operations
- It offers a collection of utility functions that streamline common tasks and enhance the overall efficiency of the backend system.
db
⦿ src.backend.db
File Name Summary
consts.py Define database constants for backend operations in the project structure.
core.py Manage core database operations for the backend system, ensuring efficient data handling and storage.
main.py Implement database connection and query functions to manage data persistence for the backend services.
utils.py - Enhances database operations by providing utility functions
- Facilitates efficient data management within the backend architecture.
server
⦿ src.backend.server
File Name Summary
consts.py Define and store constant values used throughout the backend server architecture.
core.py Implement core server functionality to handle incoming requests and manage data operations within the backend architecture.
main.py Implement server-side logic to handle API requests and responses, serving as the core backend functionality for the project.
utils.py - Enhances server functionality by providing utility functions for backend operations
- This code file in the project architecture streamlines server-side tasks, optimizing performance and facilitating seamless data processing.
settings
⦿ src.backend.settings
File Name Summary
consts.py Define and store constant values used throughout the backend settings module.
core.py - Manage core settings for the backend system, ensuring seamless configuration across modules
- This file serves as the central hub for defining and organizing key parameters that drive the functionality of the entire codebase
- It plays a crucial role in maintaining consistency and coherence in the projects architecture.
main.py - Enhances backend settings functionality by managing configuration data
- Facilitates dynamic adjustments to settings without code changes
- Improves system flexibility and scalability.
utils.py - Enhances backend functionality by providing utility functions for settings management
- Facilitates seamless configuration handling within the project architecture.
site
⦿ src.backend.site
File Name Summary
consts.py Define and store constant values used throughout the backend site architecture.
core.py Implement core functionality for the site backend, facilitating key operations within the project architecture.
main.py - Implement a RESTful API endpoint for handling site data in the backend architecture
- This code file serves as the entry point for site-related functionalities, facilitating communication between the frontend and backend systems.
utils.py Enhance backend functionality by providing utility functions for the site.
docker
⦿ docker
celery
⦿ docker.celery
File Name Summary
start.sh - Initiate and manage Celery workers, beat scheduler, and Flower for the projects asynchronous task processing
- Handles worker availability checks and starts necessary services for efficient task execution.
ranked_jobs_ms
⦿ docker.ranked_jobs_ms
File Name Summary
build.sh - Install necessary dependencies for the ranked jobs microservice in the Docker container
- The script sets up essential tools like Python, PostgreSQL, and Git, ensuring a smooth environment for the microservice to run effectively within the architecture.
python_build.sh Generate and synchronize Python virtual environment and dependencies for ranked jobs microservice using UV.
python_start.sh - Launches the Python application using Gunicorn with specified configurations for workers, timeouts, and ports
- The script activates the virtual environment and starts the server, ensuring optimal performance and accessibility for the ranked jobs microservice within the project architecture.

Getting Started

Prerequisites

This project requires the following dependencies:

  • Programming Language: Python
  • Package Manager: Pip, Uv
  • Container Runtime: Docker

Installation

Build Pygentic-AI from the source and intsall dependencies:

  1. Clone the repository:

     git clone https://github.com/fsecada01/Pygentic-AI
    
  2. Navigate to the project directory:

     cd Pygentic-AI
    
  3. Install the dependencies:

<!-- [![docker][docker-shield]][docker-link] -->
<!-- REFERENCE LINKS -->
<!-- [docker-shield]: https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white -->
<!-- [docker-link]: https://www.docker.com/ -->

**Using [docker](https://www.docker.com/):**
```sh
 docker build -t fsecada01/Pygentic-AI .
```
<!-- [![pip][pip-shield]][pip-link] -->
<!-- REFERENCE LINKS -->
<!-- [pip-shield]: https://img.shields.io/badge/Pip-3776AB.svg?style={badge_style}&logo=pypi&logoColor=white -->
<!-- [pip-link]: https://pypi.org/project/pip/ -->

**Using [pip](https://pypi.org/project/pip/):**

```sh
 pip install -r core_requirements.in dev_requirements.in
```
<!-- [![uv][uv-shield]][uv-link] -->
<!-- REFERENCE LINKS -->
<!-- [uv-shield]: https://img.shields.io/badge/uv-DE5FE9.svg?style=for-the-badge&logo=uv&logoColor=white -->
<!-- [uv-link]: https://docs.astral.sh/uv/ -->

**Using [uv](https://docs.astral.sh/uv/):**

```sh
 uv sync --all-extras --dev
```

Usage

Run the project with:

Using docker:

docker run -it {image_name}

Using pip:

python {entrypoint}

Using uv:

uv run python {entrypoint}

Testing

Pygentic-ai uses the {test_framework} test framework. Run the test suite with:

Using pip:

pytest

Using uv:

uv run pytest tests/

Roadmap

  • Task 1: Implement feature one.
  • Task 2: Implement feature two.
  • Task 3: Implement feature three.

Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/fsecada01/Pygentic-AI
    
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
    
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
    
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
    
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

Pygentic-ai is protected under the LICENSE License. For more details, refer to the LICENSE file.


Acknowledgments

  • Credit contributors, inspiration, references, etc.

Description
SWOT Analysis with assistance from Generative AI.
Readme 615 KiB
Languages
JavaScript 75.9%
Python 16.7%
HTML 3.3%
Jinja 1.9%
Shell 1.4%
Other 0.8%