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.18.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

bugout-0.1.18-py3-none-any.whl (15.9 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