Skip to main content

This package provides a Python interface for the Curated API. With it, you can easily manage issues, links, and subscribers within publications.

Project description

Example Package: Curated API

This package provides a Python interface for the Curated API. With it, you can easily manage issues, links, and subscribers within publications using the CuratedApi class.

Installation

To install the package, you can use pip:

pip install curatedapi_wm

Usage

To use the CuratedApi class within your Python project:

from curatedapi import CuratedApi

api_key = "YOUR_API_KEY"
curated_api = CuratedApi(api_key)

Make sure to replace "YOUR_API_KEY" with your actual Curated API key in order to gain access to your account via the API. Please see the documentation provided by Curated for getting started with the Curated API

Setting publication id

You must perform this step or you cannot communicate with the Curated API

To target any individual publication within the API you'll need to get its id from within Curated. You can also achieve this by reviewing the results from the following API call:

print(curated_api.request_all_publications())

This will return a JSON response containing all publications within your account. Choose the ID from the one you want to target and assign that to the curated_api instance you have created.

publication_id = "YOUR_PUBLICATION_ID"
curated_api.set_publication_id(publication_id)

Tests

The package comes with a set of tests. To run the tests:

  1. Navigate to the package directory.
  2. Run the test files using Python:
python -m unittest tests/test_curated_api.py
python -m unittest tests/test_curated_category.py
python -m unittest tests/test_curated_link.py

License

This package is licensed under the MIT license. See the LICENSE file for more details.

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

curatedapi_wm-0.9.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curatedapi_wm-0.9.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file curatedapi_wm-0.9.2.tar.gz.

File metadata

  • Download URL: curatedapi_wm-0.9.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for curatedapi_wm-0.9.2.tar.gz
Algorithm Hash digest
SHA256 4a151999455f49ebf12c92a49d6df25e76f149e908bfde179c1e299126223f54
MD5 2581b66f988b4e58c7569a5a86581261
BLAKE2b-256 7dd4ff853d42a57c255d2407040a17523279b58107700436472716b1f62b63f7

See more details on using hashes here.

File details

Details for the file curatedapi_wm-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: curatedapi_wm-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for curatedapi_wm-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f10615685c533672220238f4645442d74089802b5f1f258e099a58974645418e
MD5 1c409fa1a52f0f7d6156149dbd96d144
BLAKE2b-256 898f9ccbb3be8cd0db42f5c8ac6765034d797072b8b5365381d88c4271a2b153

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page