Skip to main content

beekeeper Build Status Documentation Status

Description

beekeeper is a Python library designed around dynamically generating a RESTful client interface based on a minimal JSON hive.

The hive specification is designed to provide beekeeper (or other applications consuming hive files) with programmatically-designed insight into the structure of both the REST endpoints that are available and the objects and methods that those endpoints represent.

While the classes available in beekeeper can be used manually to create Pythonic representations of REST endpoints, it is strongly preferred that the library be used as a whole with a constructed hive file. As APIs become larger in scale (in terms of the number of endpoints and represented objects), the time benefit of beekeeper becomes more pronounced, as adding additional objects and endpoints is a trivial process.

Requirements

beekeeper requires Python 2.7.9/3.4.3 or higher and their built-in modules, as well as xmltodict.

Installation

pip install beekeeper

Usage

The usage of beekeeper will depend on what features are provided by the person who wrote the hive file. There are a number of ways that the hive writer can make your life easier. Regardless, at a base level, usage will look something like this:

from beekeeper import API
myAPI = API.from_hive_file('fname.json')
x = myAPI.Widgets.action(id='foo', argument='bar')

If the hive developer defines an ID variable for the object you’re working with, you can subscript, dictionary style:

x = myAPI.Widgets['foo'].action(argument='bar')

If you’ve only got one remaining argument in the method call, you don’t even need to name it! You can do something like this:

x = myAPI.Widgets['foo'].action('bar')

This also holds true if you have multiple variables, but the other ones are assigned by name:

x = myAPI.Widgets['foo'].action('bar', var2='baz')

If you’re using a hive file, then it should define which variables are needed. If you try to call a function without filling in that variable, it should automatically yell at you and tell you what variables are missing. Since these variables are defined within the hive, beekeeper will do the work for you, automatically determine what data type a particular variable is, and put it exactly where it needs to go.

beekeeper will also automatically handle parsing data. When you send data, beekeeper will read the MIME type that was defined in the variable for that data, and try to automatically move it from a “Python” format (e.g., a dictionary) to the right REST API format (e.g., JSON).

This holds true in the other direction as well; beekeeper will read the MIME type of the response data, and hand it back to you in a Pythonic format! If beekeeper doesn’t know how to handle the data, it’ll just give you the raw bytes so that you can do what you need to with them.

Notes

beekeeper does not currently do SSL certificate verification when used on Python versions earlier than 2.7.9 or 3.4.3.

Metadata

Release files for beekeeper-alt 2022.9.3

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

Source distribution (sdist)

Source distribution for beekeeper-alt 2022.9.3
File Size Uploaded Provenance Actions
beekeeper-alt-2022.9.3.tar.gz 16.3 kB Without provenance Details for beekeeper-alt-2022.9.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beekeeper-alt 2022.9.3
File Interpreter ABI Platform Actions
beekeeper_alt-2022.9.3-py3-none-any.whl Python 3 none any Details for beekeeper_alt-2022.9.3-py3-none-any.whl

Total release size: 32.9 kB

Release files / beekeeper-alt-2022.9.3.tar.gz

Download URL beekeeper-alt-2022.9.3.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
18addaa163febd69a9e1ec4ec4dddc210785c94c6c1f9b2bcb2a73451b2f23e3
BLAKE2b-256 checksum
How to use checksums
2868b1c59d68275715e5174c0ec0185d3ceca3223933a6a35cda31389438e545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.7.12 Linux/5.15.0-47-generic

Release files / beekeeper_alt-2022.9.3-py3-none-any.whl

Download URL beekeeper_alt-2022.9.3-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc0beabe6374b980764f43bf997d5c7c7300e23727ca82e373cdca8081aace53
BLAKE2b-256 checksum
How to use checksums
087b963bbbef1f4177db365696db91d21d4a713d05b61835fb6a383a8ba5d4ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.7.12 Linux/5.15.0-47-generic

Security for beekeeper-alt 2022.9.3

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

2022.9.3 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