Skip to content

KrunalValvi/Fastapi-Dev-Tools

πŸ› οΈ Dev API Vault

Your Swiss Army Knife for Developer Utilities

Python FastAPI License: MIT Code Style: Black Tests codecov

Open in Dev Containers Open in GitHub Codespaces

πŸš€ Overview

Dev API Vault is a production-ready FastAPI application that consolidates essential developer utilities into a single, powerful API. It's designed to help developers streamline their workflow with commonly needed tools accessible via RESTful endpoints.

✨ Features

  • Markdown to HTML Converter - Convert markdown text to clean HTML
  • QR Code Generator - Generate QR codes from text or URLs
  • Image to Base64 - Convert images to base64 encoded strings
  • Regex Tester - Test and validate regular expressions
  • Webpage Word Counter - Count words from any webpage URL
  • Text Summarizer - Generate concise summaries from large text blocks
  • RESTful API - Easy-to-use endpoints with proper HTTP methods
  • Rate Limiting - Built-in rate limiting for API protection
  • Comprehensive Documentation - Interactive API docs with OpenAPI/Swagger
  • Production Ready - Containerized with Docker and deployable anywhere

🎯 Use Cases

  • Quickly generate QR codes for URLs or text
  • Convert documentation from Markdown to HTML
  • Process images in API workflows
  • Test and debug regular expressions
  • Analyze web content programmatically
  • Summarize articles or documentation
  • Educational purposes for learning FastAPI

πŸ› οΈ Tech Stack

  • Backend Framework: FastAPI
  • Language: Python 3.9+
  • API Documentation: OpenAPI (Swagger UI & ReDoc)
  • Testing: Pytest, HTTPX
  • Code Quality: Black, isort, Flake8, mypy
  • Containerization: Docker
  • CI/CD: GitHub Actions
  • Deployment: Render (or any cloud provider)

πŸš€ Getting Started

Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)
  • Git
  • (Optional) Docker & Docker Compose

Installation

  1. Clone the repository

    git clone https://github.com/KrunalValvi/Dev_Api_Vault.git
    cd Dev_Api_Vault
  2. Set up a virtual environment

    # Windows
    python -m venv venv
    .\venv\Scripts\activate
    
    # macOS/Linux
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies

    pip install --upgrade pip
    pip install -r requirements.txt
  4. Set up environment variables

    cp .env.example .env
    # Edit .env with your configuration
  5. Run the application

    uvicorn app.main:app --reload
  6. Access the API documentation

Using Docker

# Build the Docker image
docker build -t dev-api-vault .

# Run the container
docker run -d --name dev-api-vault -p 8000:80 dev-api-vault

πŸ“š API Endpoints

Endpoint Method Description
/api/v1/markdown-to-html POST Convert markdown to HTML
/api/v1/qr-code POST Generate QR code from text
/api/v1/image-to-base64 POST Convert image to base64
/api/v1/regex-tester POST Test regular expressions
/api/v1/word-count GET Count words in a webpage
/api/v1/summarize POST Generate text summary

For detailed API documentation, visit the interactive Swagger UI after starting the server.

πŸ§ͺ Running Tests

# Install test dependencies
pip install -r requirements-dev.txt

# Run tests
pytest

# Run with coverage
pytest --cov=app --cov-report=term-missing

# Run linters
black .
flake8
mypy .

πŸ“‚ Project Structure

Dev_Api_Vault/
β”œβ”€β”€ .github/                  # GitHub configuration
β”‚   └── workflows/            # GitHub Actions workflows
β”œβ”€β”€ app/                      # Application source code
β”‚   β”œβ”€β”€ __init__.py           # Package initialization
β”‚   β”œβ”€β”€ main.py               # FastAPI application
β”‚   β”œβ”€β”€ config.py             # Configuration settings
β”‚   β”œβ”€β”€ models.py             # Pydantic models
β”‚   β”œβ”€β”€ routers.py            # API routes
β”‚   β”œβ”€β”€ security.py           # Authentication & security
β”‚   └── utils.py              # Utility functions
β”œβ”€β”€ static/                   # Static files
β”œβ”€β”€ tests/                    # Test files
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ conftest.py
β”‚   β”œβ”€β”€ test_api.py
β”‚   └── test_edge_cases.py
β”œβ”€β”€ .env.example              # Example environment variables
β”œβ”€β”€ .gitignore                # Git ignore file
β”œβ”€β”€ docker-compose.yml        # Docker Compose configuration
β”œβ”€β”€ Dockerfile                # Docker configuration
β”œβ”€β”€ pyproject.toml            # Project configuration
β”œβ”€β”€ README.md                 # This file
└── requirements.txt          # Project dependencies

🀝 Contributing

Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ Changelog

See CHANGELOG.md for a list of notable changes.

πŸ“§ Contact

Krunal Valvi - @krunalvalvi

Project Link: https://github.com/KrunalValvi/Dev_Api_Vault

πŸ” Keywords

fastapi, python, api, developer-tools, rest-api, markdown, qrcode, regex, text-processing, web-development, open-source, docker, github-actions, api-documentation, swagger, redoc, backend, web-services, automation, productivity-tools, devops


Made with ❀️ by Krunal Valvi

FastAPI Python License Deploy Status Tests Code Coverage

πŸš€ Live API | πŸ“– Documentation | πŸ› Report Bug | πŸ’‘ Request Feature


πŸ“š Additional Documentation


🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’» Make your changes
  4. βœ… Add tests for new functionality
  5. πŸ§ͺ Run the test suite (pytest)
  6. πŸ“ Commit your changes (git commit -m 'Add amazing feature')
  7. πŸ“€ Push to your branch (git push origin feature/amazing-feature)
  8. πŸ”„ Open a Pull Request

πŸ—ΊοΈ Roadmap

  • v1.1.0 - Authentication & API Keys
  • v1.2.0 - Rate limiting and usage analytics
  • v1.3.0 - Additional text processing utilities
  • v1.4.0 - WebSocket support for real-time operations
  • v2.0.0 - Machine learning-powered text analysis

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • FastAPI team for the amazing framework
  • Python community for excellent libraries
  • Contributors who make this project better

πŸ“ž Support & Community


⭐ If this project helped you, please give it a star!

GitHub stars

Made with ❀️ by KrunalValvi

About

πŸ› οΈ FastAPI utility suite with 6 developer tools - QR codes, markdown, regex testing & more

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published