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.12.9.tar.gz (115.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perseus_restful_api_framework-1.12.9-py3-none-any.whl (154.7 kB view details)

Uploaded Python 3

File details

Details for the file perseus-restful-api-framework-1.12.9.tar.gz.

File metadata

  • Download URL: perseus-restful-api-framework-1.12.9.tar.gz
  • Upload date:
  • Size: 115.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for perseus-restful-api-framework-1.12.9.tar.gz
Algorithm Hash digest
SHA256 c1f115e31ca0cbd2e4303670c360369d0c3a24b1a57edfbd33fe7d1442e8b66e
MD5 d83a1b50213b881f9ae9053142a5de2c
BLAKE2b-256 cd3abdef1b02fabfd5f8d6efebc3df022a1c1b31b9c6c1106376fc078bbde52c

See more details on using hashes here.

File details

Details for the file perseus_restful_api_framework-1.12.9-py3-none-any.whl.

File metadata

  • Download URL: perseus_restful_api_framework-1.12.9-py3-none-any.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for perseus_restful_api_framework-1.12.9-py3-none-any.whl
Algorithm Hash digest
SHA256 40bebe3704b3e30a84fd2c62aad7c79600ca4d223e0851f8b1424091803597e3
MD5 6b85115dd881f9424bf0daa79c2c4b8c
BLAKE2b-256 ed86ac609394916712487227a97a87f5f98ad6092db54f332c04ba53bdb4b98f

See more details on using hashes here.

Supported by

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