Skip to main content

SimplesAPI is intended to be the easiest API to implementation in Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplesapi-0.0.0a14.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplesapi-0.0.0a14-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file simplesapi-0.0.0a14.tar.gz.

File metadata

  • Download URL: simplesapi-0.0.0a14.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Windows/11

File hashes

Hashes for simplesapi-0.0.0a14.tar.gz
Algorithm Hash digest
SHA256 3ea2e8d1523815b7be45cafbcdaf8d9cba00fad900de0cbc7165b5d67f61f15d
MD5 be16f8fd50cb1e2a7d5a84cb3107d989
BLAKE2b-256 0a2db5a13b7581e60b8a40df1a474ac9c8b35f6f883b344f3fd4e33855ef5996

See more details on using hashes here.

File details

Details for the file simplesapi-0.0.0a14-py3-none-any.whl.

File metadata

  • Download URL: simplesapi-0.0.0a14-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Windows/11

File hashes

Hashes for simplesapi-0.0.0a14-py3-none-any.whl
Algorithm Hash digest
SHA256 717ea9c01e78e37708aab55064625a69c10aeda0f23817638b2ce74f05d07f81
MD5 267d4078bccd3d6ff50585a26eb95286
BLAKE2b-256 9a1212bb58928c8e45a29547ed8a77721a8b3d0c7a4a05cd1c2757194ff0b732

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page