Skip to content

oandersonmagalhaes/simplesapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplesAPI

SimplesAPI is a Python-based application framework designed to simplify the implementation of various functionalities such as database connections, structured logging, event dispatching, bucket access, and queue processing. By reducing code repetition and enhancing code readability, SimpleAPI allows developers to focus on solving business problems and rapidly create Proof of Concepts (POCs).

image

Features (WIP)

  • Database Connections: Seamlessly connect to different types of databases with minimal configuration.
  • Structured Logging: Implement structured and meaningful logs effortlessly.
  • Event Dispatching: Send and handle events with ease.
  • Bucket Access: Access and manage data stored in buckets.
  • Queue Processing: Send messages to and retrieve messages from processing queues.
  • Code Simplicity: Reduce boilerplate code to keep your codebase clean and maintainable.
  • Rapid POC Development: Quickly develop and iterate on Proof of Concepts.

Installation

To install SimplesAPI, simply run:

pip install simplesapi

Getting Started

Basic Setup

The main entry point of your application (main.py) should be set up as follows:

from simplesapi.app import SimplesAPI
app = SimplesAPI(routes_path="routes")

Folder Structure

SimpleAPI uses a folder structure to define routes. For example, to create a GET route for /users/{userId}, the folder structure should be:

routes/health-check__GET.py
routes/users/POST.py
routes/users/[userId]__GET.py
routes/users/DELETE.py
routes/users/PATCH.py

Route Handler

Inside the route file ([userId]__GET.py), you should define an asynchronous handler function:

async def handler(userId: str):
    return {"id": userId}

Running

uvicorn main:app

Contributing

We welcome contributions to SimpleAPI! Please read our contributing guidelines before submitting a pull request.

License

SimpleAPI is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or feedback, please contact in project Github.

By leveraging SimpleAPI, developers can streamline their application development process, focus on core business logic, and quickly bring their ideas to life.

About

SimplesAPI

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages