Skip to main content

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.7.1

  • Correct support for UTF encoded responses.

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

Metadata

Release files for slumber 0.7.1

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

Source distribution (sdist)

Source distribution for slumber 0.7.1
File Size Uploaded
slumber-0.7.1.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slumber 0.7.1
File Interpreter ABI Platform
slumber-0.7.1-py2-none-any.whl Python 2 none any Details

Total release size: 20.5 kB

Release files / slumber-0.7.1.tar.gz

Download URL slumber-0.7.1.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
96899ce914f8d7862ce34f4e50af3a82e35588ab61b4912b85844479f4d177cb
BLAKE2b-256 checksum
How to use checksums
173a6d42c6a5909207aa2487fda0c6f09c7dac259e5154d6ad74ec160db69660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / slumber-0.7.1-py2-none-any.whl

Download URL slumber-0.7.1-py2-none-any.whl
Size 9.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
298d0461657337416aa53c9fe54864cb5960a009beceb2058b17fa98dfb01e9b
BLAKE2b-256 checksum
How to use checksums
9c538e2cb7501c17f9367b02a8ce62cb463824f9c5f7884e4fe6c5f13cb79858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

1 release file

0.6.0

2 release files

0.5.3

1 release file

0.5.1

1 release file

0.5

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.1.3

1 release file

0.1.2

1 release file

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