Skip to main content

Python client library for Bugout API

Project description

bugout-python

Python client library for Bugout API

Setup

  • Add variables from sample.env in you development environment
export BUGOUT_TIMEOUT_SECONDS=5
  • Example of usage, just fill token, group_id, journal_id and entry_id with proper values from your account. Or remove unnecessary variables and API calls.
from bugout.app import Bugout


def main():
    bugout = Bugout()

    token = ""
    group_id = ""
    journal_id = ""
    entry_id = ""

    user = bugout.get_user(token=token)
    print(f"User name is {user.username}")

    group = bugout.get_group(token=token, group_id=group_id)

    journal = bugout.get_journal(token=token, journal_id=journal_id)
    entry = bugout.get_entry(token=token, journal_id=journal.id, entry_id=entry_id)

    search_res = bugout.search(
        token=token, journal_id=journal.id, query="your query", content=False
    )
    print(f"Search results: {search_res}")


if __name__ == "__main__":
    main()

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

bugout-0.1.20.tar.gz (12.5 kB view hashes)

Uploaded source

Built Distribution

bugout-0.1.20-py3-none-any.whl (16.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page