Skip to main content

Unofficial SDK for interacting with Bokio.

Project description

PyBokio

License Latest PyPI version PyPI status

Unofficial SDK for interacting with Bokio

Currently the project is in very early development and very little functionality can be used. But if you are eager to get stuff going, please consider helping out by contributing!

Usage

Connecting

Connecting with credentials

The simplest way to connect with the client is through credentials.

from pybokio import BokioClient

client = BokioClient(
    company_id="00000000-0000-4000-0000-000000000000",
    username="your@email.here",
    password="your.password"
)
client.connect()

Connecting with cookies

A preferred way to connect is to reuse the cookies after logging in with credentials.

Saving cookies from an existing session

import pickle

...

cookies = client.get_cookies()
with open('session.pickle', 'wb') as f:
    pickle.dump(cookies, f)

Reusing cookies to connect again

from pybokio import BokioClient
import pickle

with open('session.pickle') as f:
    cookies = pickle.load(f)

client = BokioClient.from_cookies(
    company_id="00000000-0000-4000-0000-000000000000",
    cookies=cookies
)
client.connect()

Contributing

Contributions are always welcome!

To contribute, please take the following steps:

  1. Fork the repo
  2. Add your change
  3. Make a pull request with a short description of the change you're proposing.

Authors

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

pybokio-0.1.1.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

pybokio-0.1.1-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

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