Skip to main content

A library that makes consuming a REST API easier and more convenient

Project description

Slumber Build status Test coverage percentage Documentation

Slumber is a Python library that provides a convenient yet powerful object-oriented interface to ReSTful APIs. It acts as a wrapper around the excellent requests library and abstracts away the handling of URLs, serialization, and request processing.

Getting Help

Visit IRC channel (#slumber on irc.freenode.net) to get help, bounce ideas or generally shoot the breeze.

QuickStart

  1. Install Slumber:

    $ pip install slumber
  2. Install Optional Requirement:

    pip install pyyaml
  3. Use Slumber!

Requirements

Slumber requires the following modules.

  • Python 2.6+

  • requests

  • pyyaml (If you are using the optional YAML serialization)

Changelog

development version

0.6.2

  • Further Python 3 compatibility fixes, many thanks to Alexander Shchepetilnikov (irqed)

0.6.1

  • Remove simplejson dependency.

  • Support range now Python 2.6 - Python 3.4

0.6.0

  • All HTTP methods support multipart/form-data. The new files parameter is directly passed to requests. Thanks to Philip Neustrom and Diego Gaustein.

0.5.2

  • Now compatible with requests 1.0 thanks to Matias Saguir.

  • Fix bug when using default serializer. Thanks to Andy McKay

0.4.2

  • Support decoded unicode url fragments - Thanks @collinwat

0.4.1

  • Added a session kwarg to slumber.API allowing passing a requests session that will be used instead of the slumber created one

0.4.0

  • (Backwards Incompatible) Switched from httplib2 to requests

  • (Backwards Incompatible) Removed the Meta class Magic

  • (Backwards Incompatible) Removed the ability to subclass slumber.API to specify defaults

  • (Backwards Incompatible) New Syntax for Specifying Authentication

0.3.1

  • Fix regression where pre 0.3 urls were assumed to end in slash, and 0.3.0 presumed to end in not slash. Urls are now assumed to end in a slash, and if you don’t want this behavior you can disable it by the append_slash kwarg/Meta option (set to False to disable it).

  • Fix regression caused by a mistyped variable name.

0.3.0

  • Allowed nesting resources infinitely to allow more complex api usage.

  • Cleaned up the Meta class and allow subclassing slumber.API

  • (Backwards Incompatible) Cleaned up the exception names.

  • (Backwards Incompatible) Renamed the slumber.API serialization kwarg from default_format to format to be more consistent

  • Improved the documentation

  • Added Some Tests (This could still be better)

0.2.5

  • Fixed https urls and the accidental force to port 80

  • Fixed the assumption that all urls end in a trailing slash

0.2.4

  • Fixed Including of Changelog.rst

0.2.3

  • Updated the docs to include a section about url parameters

0.2

  • (Backwards Incompatible) Move specifying a non default serializer from api.resource.get(format="yaml") to api.resource(format="yaml").get()

  • Reworked the internal Resource api to not clobber any kwargs passed to it. This fixes a bug where you couldn’t use format or url as the name for one of the url parameters.

0.1.3

  • Fix for Resource.post() not passing kwargs to Resource.get()

0.1.2

  • Initial public release of Slumber

Project details


Download files

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

Source Distribution

slumber-0.6.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

slumber-0.6.2-py2-none-any.whl (9.2 kB view details)

Uploaded Python 2

File details

Details for the file slumber-0.6.2.tar.gz.

File metadata

  • Download URL: slumber-0.6.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for slumber-0.6.2.tar.gz
Algorithm Hash digest
SHA256 f135034d8a4ba644207e4edcc85b2695e752c5445544cf25b28c3b12ed6d6c5f
MD5 a78f6932fac557248e176570e172067b
BLAKE2b-256 c7ed3cb30e1630650127407b84781b368be0287d34030ee49f5019fbd25cc29b

See more details on using hashes here.

Provenance

File details

Details for the file slumber-0.6.2-py2-none-any.whl.

File metadata

File hashes

Hashes for slumber-0.6.2-py2-none-any.whl
Algorithm Hash digest
SHA256 05199ea780090f0c41752f5af97f506b70b9c2580b73e0231ac83155022ea381
MD5 c48f21b153ca95fac4fe16df9336996f
BLAKE2b-256 c895fc2659b7085f74537532ee590fc93775438da76d865e82aa11702cb3baed

See more details on using hashes here.

Provenance

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