Skip to main content

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.

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 the database, supporting a variety of database systems.
  • 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 job processed, allowing for easy tracking and management of tasks.

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.6 or later
  • Flask
  • SQLAlchemy
  • Requests

Additionally, you will need:

  • A PostgreSQL database or any SQL database supported by SQLAlchemy.
  • An .env file configured with your database URI and authorization key.

Installation

Clone the repository to your local machine: git clone https://github.com/<your-github-username>/<repository-name>.git cd <repository-name>

Install the required Python packages: pip install -r requirements.txt

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.

Running the Application

To start the Drumpler API server: python Drumpler.py

To initiate mammoth for processing jobs: python mammoth.py

Ensure that mammoth.py is customized to include your specific job processing logic within the process_request_data function.

API Endpoints

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


Download files

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

Source Distribution

drumpler-1.0.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

drumpler-1.0.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file drumpler-1.0.0.tar.gz.

File metadata

  • Download URL: drumpler-1.0.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for drumpler-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df4463dd8b7630d922d156069267329123d563656f264f9506163bd77987e0f4
MD5 7731c06fbd9019b0130125f81151348e
BLAKE2b-256 2f93bbcae95ce9ad090b98b17dcc604393b52b44d3adac80a3102d8847811d34

See more details on using hashes here.

File details

Details for the file drumpler-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: drumpler-1.0.0-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

Hashes for drumpler-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 862cbb0ed36d3a31f3a2b0b81b598073940549d14dfab83b27693dc1291d082e
MD5 1064dc74e8e3357b04d48c4c17a53808
BLAKE2b-256 d26afb2559138b88ed78c1446787f84d3b0a3a6378d31a4db9886e95a9f39d97

See more details on using hashes here.

Supported by

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