Skip to main content

Bedframe is a resource-oriented web services framework.

Installation

A Bedframe service runs on an underlying web server. Support for each particular web server is provided via a corresponding plugin. Bedframe releases include some web server plugins, which are activated by installing their corresponding package extras. These are the currently supported extras:

tornado

Support for the Tornado web server (via tornado.web.Application).

tornado_wsgi

Support for the Tornado WSGI web server (via tornado.wsgi.WSGIApplication).

For example, to install Bedframe with support for the Tornado WSGI web server, you can run

pip install bedframe[tornado_wsgi]

In addition, Bedframe supports these other extras:

ldap

Support for the Lightweight Directory Access Protocol (LDAP) for authentication (via python-ldap).

memcached

Support for memcached for authentication (via python-memcached).

test_ldap

Support for the Lightweight Directory Access Protocol (LDAP) for automated testing (via Spruce-ldap and OpenLDAP).

Examples

“Hello, world” service

import bedframe as _bedframe
import bedframe.webtypes as _webtypes

class HelloWorldResource(_bedframe.WebResource):
    @_bedframe.webmethod(_webtypes.unicode)
    def get(self):
        return u'Hello, world!'

service = _bedframe.WebService(uris=('http://localhost:8080',))
service.resources[r'/helloworld'] = HelloWorldResource
service.start()

Example usage (Napper):

>>> import bedframe.webtypes as _webtypes
>>> import napper as _napper
>>> uri = 'http://localhost:8080/helloworld'
>>> response = _napper.request_uri('get', uri)
>>> hello = _napper.extract_retval(response, _webtypes.unicode)
>>> print hello
Hello, world!

Example usage (Requests):

>>> import requests as _requests
>>> uri = 'http://localhost:8080/helloworld'
>>> headers = {'Accept': ', '.join(('application/json', '*/*; q=0.01'))}
>>> response = _requests.get(uri, headers=headers)
>>> hello = response.json()['retval']
>>> print hello
Hello, world!

Example usage (HTTPie):

$ uri='http://localhost:8080/helloworld'
$ http get "$uri" Accept:'application/json,*/*; q=0.01' --body
{
    "auth_info": {
        "accepted": null,
        "realm": null,
        "user": null
    },
    "retval": "Hello, world!",
    "type": "bedframe._responses._return:WebReturnResponse"
}

Changelog

0.13.0 (2013-10-11)

  • First public version.

Metadata

Release files for Bedframe 0.13.5

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

Source distribution (sdist)

Source distribution for Bedframe 0.13.5
File Size Uploaded Provenance
Bedframe-0.13.5.tar.gz 102.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for Bedframe 0.13.5
File Interpreter ABI Platform
Bedframe-0.13.5-py27-none-any.whl Python 2.7 none any Details
Bedframe-0.13.5-py2.7.egg Legacy Egg format - - Details

Total release size: 354.5 kB

Release files / Bedframe-0.13.5.tar.gz

Download URL Bedframe-0.13.5.tar.gz
Size 102.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9227156448390c33874ea85e129cb5bf08a6c866ecbf1902cd8bc96355e1ba9a
BLAKE2b-256 checksum
How to use checksums
9a648b44bb5816ce08c2219235469b28ba5310a8535e677850c63e378eeeaff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Bedframe-0.13.5-py27-none-any.whl

Download URL Bedframe-0.13.5-py27-none-any.whl
Size 130.7 kB
Tags Python 2.7
SHA-256 checksum
How to use checksums
05be2f380a40095732f69f41749e6abedd4290089e88522a45010925f0504796
BLAKE2b-256 checksum
How to use checksums
f4ebe6f7cf20ce32de4030c857d3b3f057f4b80a1589e1821f703aa566e06f8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Bedframe-0.13.5-py2.7.egg

Download URL Bedframe-0.13.5-py2.7.egg
Size 121.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
588daeb9b97dd36d83f8c5e75c471624eb7c9908146fa5e2f2bde98e2d0cf8ea
BLAKE2b-256 checksum
How to use checksums
d506b24e5c78a4faaa27f187ec09a485526698cdb195f42d3f545f86983a3337
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Bedframe 0.13.5

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.

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