Skip to main content

Python server framework for quickly building RESTful APIs with minimal effort.

Project description

Perseus: RESTful API Server Framework

Perseus is a Python framework for quickly building RESTful API servers with minimal effort.

Perseus provides an initial set of core services that supports the following features:

  • Client application registration with API keys generation
  • Client application access control with RESTful request signature
  • Client application and RESTful API server version compatibility check
  • User authentication and session management
  • Team/group management
  • RESTful request logging with data sensitiveness support
  • RESTful service automatic discovery
  • HTTP request query parameters & body JSON message automatically parsing (depending on the HTTP method used) with data type check and conversion

Perseus is based on Tornado for handling client network connection.

RESTful API Request Handler

from majormode.perseus.service.base_http_handler import HttpRequest
from majormode.perseus.service.base_http_handler import HttpRequestHandler
from majormode.perseus.service.base_http_handler import http_request

import AttendantService


class AttendantServiceHttpRequestHandler(HttpRequestHandler):
    @http_request(r'^/attendant/session$',
                  http_method=HttpRequest.HttpMethod.POST,
                  authentication_required=False,
                  sensitive_data=True,
                  signature_required=False)
    def sign_in(self, request):
        email_address = request.get_argument(
            'email_address',
            data_type=HttpRequest.ArgumentDataType.email_address,
            is_required=True)

        password = request.get_argument(
            'password',
            data_type=HttpRequest.ArgumentDataType.string,
            is_required=True)

        return AttendantService().sign_in(request.app_id, email_address, password)

Run the RESTful API Server Process

$ fab configure && fab start

Hashtags/Topics: #perseus #restful #api #server #framework #python

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

perseus-restful-api-framework-1.14.6.tar.gz (119.2 kB view hashes)

Uploaded Source

Built Distribution

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