Skip to main content

PyPI GitHub release (latest by date including pre-releases) PyPI - License Lines of code GitHub issues GitHub pull requests

rest-tools

This project contains REST tools in python, as common code for multiple other projects under https://github.com/WIPACrepo.

All code uses python asyncio, so is fully asyncronous.

Note that both the client and server assume starting the asyncio loop happens elsewhere - they do not start the loop themselves.

Client

A REST API client exists under rest_tools.client. Use as:

    from rest_tools.client import RestClient

    api = RestClient('http://my.site.here/api', token='XXXX')
    ret = await api.request('GET', '/fruits/apple')
    ret = await api.request('POST', '/fruits', {'name': 'banana'})

Server

A REST API server exists under rest_tools.server. Use as:

    import asyncio
    from rest_tools.server import RestServer, RestHandler

    class Fruits(RestHandler):
        def post(self):
            # handle a new fruit
            self.write({})

    server = RestServer()
    server.add_route('/fruits', Fruits)
    server.startup(address='my.site.here', port=8080)
    asyncio.get_event_loop().run_forever()

The server uses Tornado to handle HTTP connections. It is recommended to use Apache or Nginx as a front-facing proxy, to handle TLS sessions and non-standard HTTP requests in production.

Metadata

Release files for wipac-rest-tools 1.3.20

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

Source distribution (sdist)

Source distribution for wipac-rest-tools 1.3.20
File Size Uploaded Provenance Actions
wipac-rest-tools-1.3.20.tar.gz 24.0 kB Without provenance Details for wipac-rest-tools-1.3.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wipac-rest-tools 1.3.20
File Interpreter ABI Platform Actions
wipac_rest_tools-1.3.20-py3-none-any.whl Python 3 none any Details for wipac_rest_tools-1.3.20-py3-none-any.whl

Total release size: 52.8 kB

Release files / wipac-rest-tools-1.3.20.tar.gz

Download URL wipac-rest-tools-1.3.20.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5eb599d7d3502db21d5914539c25c5872ac1cacfc3910b9ab6cd0628283bc9fa
BLAKE2b-256 checksum
How to use checksums
5bbb285a2e39c110b2157b4b65a8d20e7e6e50fe1b27dea4c691e7f7a7c572ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Release files / wipac_rest_tools-1.3.20-py3-none-any.whl

Download URL wipac_rest_tools-1.3.20-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51318f14bcd3ed6205ffdf966df01700279111186768da0c07a2c0726b6aa031
BLAKE2b-256 checksum
How to use checksums
d53fb6ca4307b92eb875a8eabd968b8d3721de2154f2696222e388bd5f6435a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

Security for wipac-rest-tools 1.3.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.20 This release

2 release files No provenance

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