Skip to main content

A python library that implements a thrift parser into Django to use it's models and controllers to implement RPC/HTTP services.

Project description

Manifold is a Django application designed by ACV Auctions that allows for easy creation and serving of an RPC server through a WSGI interface using Gunicorn Thrift. Manifold uses Apache Thrift to standardize message transmission.

It allows the Django project to define the Thrift file location and service to be defined in the settings file, which is shown below.

# Thrift Configurations
MANIFOLD = {
    'default': {
        # Path to Thrift file, either absolute or relative
        'file': os.path.join(BASE_DIR, 'path/to/service.thrift'),
        'service': 'MyServiceName'
    }
}

With these settings, you can do a few things. Define Python functions to handle RPC calls, load the Thrift in memory as a Python module, and serve an RPC WSGI server in both development and production.

Credits and Maintenance

Manifold is built using Django and Thriftpy, and is maintained by ACV Auctions.

Thrift Guide

For an introduction and in-depth description of Thrift, we recommend following Thrift: The Missing Guide.

Quickstart

  1. Add manifold to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        # ...
        'manifold',
    ]
  2. Define your Thrift configuration like this:

    # Thrift Configurations
    MANIFOLD = {
        'default': {
            # Path to Thrift file, either absolute or relative
            'file': os.path.join(BASE_DIR, 'path/to/service.thrift'),
            'service': 'MyServiceName'
        }
    }
  3. Run the server. You can either use the manage.py command:

    python manage.py runrpcserver

Usage Guide

View the wiki for usage guides.

Contributing Guide

This project is developed and maintained by ACV Auctions. We are always open to outside contributers helping to making Manifold better. Please refer to our Contribution Guide to make a change.

License

Manifold is Apache 2.0 Licensed

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_manifold-1.3-py2.py3-none-any.whl (20.4 kB view hashes)

Uploaded Python 2 Python 3

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