Skip to content

yazdipour/OmnivoreQL

Repository files navigation

OmnivoreQL: Omnivore API client for Python

This is a Python client for the Omnivore API.

GitHub stars PyPI version

Github Sponsor

How to use

To use omnivoreql in your Python project, you can follow these steps:

Install the omnivoreql package using pip:

pip install omnivoreql

Import the package into your project:

import omnivoreql

Create a new instance of the client:

api_token = "your_api_token_here"
omnivoreql_client = omnivoreql.OmnivoreQL(api_token)

Use the methods of the OmnivoreQL class to interact with the Omnivore API.

profile = omnivoreql_client.get_profile()

result = omnivoreql_client.save_url("https://www.google.com")

articles = omnivoreql_client.get_articles()

username = profile['me']['profile']['username']
slug = articles['search']['edges'][0]['node']['slug']
articles = omnivoreql_client.get_article(username, slug)

labels = omnivoreql_client.get_labels()
subscriptions = omnivoreql_client.get_subscriptions()