Framework for rapidly developing a restful API that requires post processing
Project description
Drumpler
Drumpler
is a general-purpose application designed to facilitate efficient workflow automation through RESTful API interactions and job processing. Built on Flask and SQLAlchemy, this application serves as a robust backend for capturing, storing, and processing HTTP requests in a scalable manner. The application is split into two main components: drumpler.py
for handling RESTful API requests and mammoth.py
for querying the API and processing jobs asynchronously.
High Level Overview
Features
- RESTful API Endpoints: Secure and scalable endpoints for handling HTTP requests, including POST, GET, PUT, and DELETE operations.
- Database Integration: Utilizes SQLAlchemy for ORM-based interactions with Postgres.
- Job Processing: Facilitates the asynchronous processing of tasks with support for multi-threading and multi-processing, ensuring efficient workflow automation.
- Event Logging: Detailed event logging for each HTTP request, job processing and related events, allowing for easy tracking and management of tasks.
Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.6 or later
- PostgreSQL
Installation
Install Drumpler via pip:
pip install Drumpler
Configuration
Create a .env
file in the root directory of the application with the following contents:
DATABASE_URI=your_database_uri_here
AUTHORIZATION_KEY=your_authorization_key_here
Drumpler_HOST=0.0.0.0
Drumpler_PORT=5000
Drumpler_DEBUG=True
Replace your_database_uri_here
and your_authorization_key_here
with your actual database URI and desired authorization key.
Using the Application
To start the Drumpler
API server:
import drumpler
# Now, you can create an instance of the Drumpler class
app = drumpler.Drumpler(host="0.0.0.0", port=5000, debug=True)
# And call the run method on this instance
app.run()
API Endpoints (Drumpler)
The application exposes several endpoints for interacting with the system:
- POST
/request
: Submit a new request for processing. - GET
/request/<int:request_id>
: Retrieve a specific request by its ID. - GET
/request/next-unhandled
: Fetch the next unhandled request. - PUT
/request/<int:request_id>
: Update the status of a request. - DELETE
/request/<int:request_id>
: Delete a specific request.
Contributing
Contributions to Drumpler
are welcome! Please follow the standard fork-branch-PR workflow.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Drumpler-1.0.4.tar.gz
.
File metadata
- Download URL: Drumpler-1.0.4.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c80cb058f4c75f51970718c29d3ef2a0147e00984b2129455795661127341b |
|
MD5 | 18147ac2ffa20f50e1665fc0ed75b38b |
|
BLAKE2b-256 | 7814bf014af5c00d1f368eb5181d351049936f59f4da456c2d9b4514ca344b23 |
File details
Details for the file Drumpler-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: Drumpler-1.0.4-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 600ab09737515d92c485083d3c4ebe635ab947f0e24efbac96f92cb21ddb046e |
|
MD5 | bf733ac1a5989040c3dba4514dc8acb0 |
|
BLAKE2b-256 | 3ced39d23098cca885639197ee6d342204a8b256caa09995014df3290c65cc7f |