Skip to main content

Beeswax Wrapper

The beeswax wrapper is a python API for the beeswax DSP

beeswax_wrapper is currently supported for python2 and python3.

Installation

$ pip install beeswax_wrapper

Imports

>>> from beeswax_wrapper import BeeswaxAPI, configure_endpoint

BeeswaxAPI is the main interface to the package. It allows for seamless communication with the true beeswax API. The API lazily loads a BeeswaxDAL to access the API and manage authentication state. The BeeswaxDAL is shared among all BeeswaxAPI classes.

get_beeswax_dal() returns the single BeeswaxDAL object used by the apis. Modifying the BeeswaxDAL object returned by this function affects all BeeswaxAPI classes. Updates should be made to this dal using the configure_endpoint function as follows:

>>> from beeswax_wrapper import BeeswaxAPI, configure_endpoint
>>> api = BeeswaxAPI()
>>> configure_endpoint('http://endpoint.api.beeswax.com/rest/')
>>> api.dal.endpoint_url
'http://endpoint.api.beeswax.com/rest/'

Methods

The BeeswaxAPI operates with an object restful structure. The basic method calls are organised as api.<object>.<restful_method> where the restful methods are:

  • retrieve
  • list
  • create
  • update
  • delete

Some keywords that are specific to each restful endpoint are supplied but the full list of keywords is available here: https://docs.beeswax.com/docs/getting-started

Examples

>>> from beeswax_wrapper import BeeswaxAPI
>>> api = BeeswaxAPI()

>>> # get account information for an id
>>> api.accounts.retrieve(account_id=4)

>>> # get a list of campaigns
>>> api.campaigns.list()

>>> # delete a lineitem by id
>>> api.line_items.delete(line_item_id=62)

>>> # change user
>>> api.change_user('<username>', '<password>')
>>> # cookies are preserved per class

Exceptions

The BeeswaxAPI is metaclassed to raise only a BeeswaxRESTException.

Authentication

The beeswax_wrapper authenticates once per BeeswaxDAL instance. The authentication is for short connection durations only. In the event that a connection times out or is unavailable, the BeeswaxDAL will attempt to re-authenticate. Credentials from the DAL are queried from the os keyring.

Adding credentials

$ python beeswax_wrapper/credentials/credential_manager.py
Beeswax Username:
Beeswax Password:
$

Metadata

Release files for beeswax-wrapper 1.1.9

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

Source distribution (sdist)

Source distribution for beeswax-wrapper 1.1.9
File Size Uploaded Provenance Actions
beeswax-wrapper-1.1.9.tar.gz 13.7 kB Without provenance Details for beeswax-wrapper-1.1.9.tar.gz

Release files / beeswax-wrapper-1.1.9.tar.gz

Download URL beeswax-wrapper-1.1.9.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81b9db8405388ef2e83f61dba88f9b6906adc14dc3b1dfbf0ff1c2c8a3953d25
BLAKE2b-256 checksum
How to use checksums
c7743053b00b692fed18886e59891cdf482c00b08109315962c6fee9fbf6525c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.14

Security for beeswax-wrapper 1.1.9

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.

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