Skip to main content

deepraaga-api

Flask-based API serving endpoints for DeepRaaga music generation. Extracted from the original DeepRaaga project.

Installation

You can install the API layer via pip. To ensure that the underlying neural network models are available for generation, you should install it with the models optional dependencies:

pip install deepraaga-api[models]

Overview

The deepraaga-api package provides a RESTful interface over the DeepRaaga machine learning backend. It allows external applications (like React frontends) to easily query and generate sequential notes based on learned Carnatic representations.

Usage

You can start the API directly using the bundled CLI tool:

deepraaga-api --port 8000

This will spin up a local Flask server running on http://localhost:8000.

REST Endpoints

GET /

Returns the status of the DeepRaaga API.

POST /api/generate

Generates a sequence of notes.

  • Request Body:
    {
        "raga": "mayamalavagowla",
        "duration": 30,
        "temperature": 1.0
    }
    
  • Response:
    {
        "notes": ["C4", "D4", "E4", "F4", "G4"],
        "raga": "mayamalavagowla"
    }
    

Programmatic Usage

You can also import the Flask app directly to mount it in another WSGI server (like Gunicorn):

from deepraaga_api.serve import app

if __name__ == '__main__':
    app.run(port=8080)

License

This project is licensed under the MIT License.

Release files for deepraaga-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepraaga-api 0.1.0
File Size Uploaded
deepraaga_api-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deepraaga-api 0.1.0
File Interpreter ABI Platform
deepraaga_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / deepraaga_api-0.1.0.tar.gz

Download URL deepraaga_api-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
940851fe50f0e48a2eebb3707465ec5867e0762add501bf66484b088a29977d5
BLAKE2b-256 checksum
How to use checksums
f74df1361b1b317e127f04a142c241c32a45de1bbcdf05d8d7651dd86ec0b63c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / deepraaga_api-0.1.0-py3-none-any.whl

Download URL deepraaga_api-0.1.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1883681dfc54f2a2841984a0cd214a442e97aee3c8e9a07c5afeee104f0d2ca
BLAKE2b-256 checksum
How to use checksums
5bbdae5c3d7b0612e32cea229ab4108907b103d12a4bb3df1cfa17e763e90e96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page