Skip to main content

Python bindings for the RGB Notes API

Project description

RGB Notes Python Library
========================

The RGB Notes Python library provides convenient access to the RGB Notes
API from applications written in the Python language. It includes a
pre-defined set of classes for API resources that initialize themselves
dynamically from API responses.

Documentation
-------------
See the API docs here: `https://rgbnotes.com/help?section=api`


Installation
------------
You don't need this source code unless you want to modify the package.
If you just want to use the package, just run:

.. codeblock:: bash

pip install --upgrade rgbnotes

Install from source with:

.. codeblock:: bash

python setup.py install


Requirements
~~~~~~~~~~~~
- Python 2.6+ or Python 3.3+ (PyPy supported)
- Requests Module (PyPy supported)


Usage
-----
The library needs to be configured with your account's secret key which
is available in your `RGB Notes
Settings <https://rgbnotes.com/login.php?r=/settings.php>`__.


For Developers
==============

API v1
------
.. codeblock:: python

import rgbnotes
rgbnotes.client_key = "your client key"
rgbnotes.client_id = "your client id"
# request a client or project token. Refer to the API
# documentation to see the difference in scope
rgbnotes.Token.client()
rgbnotes.Token.project(project_id=2, client_id=7)


API Methods
-----------

All methods are encapsulated in it's own class.
The method names used on classes are:

.. codeblock:: python

CLS.create()
CLS.list()
CLS.retrieve(id)
CLS.modify(id, **data)
CLS.delete(id)


Projects Request
~~~~~~~~~~
.. codeblock:: python

rgbnotes.Project.create(title="New Project")
rgbnotes.Project.list()
rgbnotes.Project.modify(2, title="New Project Title")
rgbnotes.Project.delete(2)


Assets Request
~~~~~~~~~~
.. codeblock:: python

# requires a project Token or project_id parameter
rgbnotes.Asset.list()
rgbnotes.Asset.create(title="New Asset")
rgbnotes.Asset.version(asset_id=422)


Notes Request
~~~~~~~~~~
.. codeblock:: python

# requires a project Token or project_id parameter
rgbnotes.Note.list()


Users Request
~~~~~~~~~~
.. codeblock:: python

rgbnotes.User.create(name="John Doe", email="john@doe.com")
rgbnotes.User.list()


File Request
~~~~~~~~~~
.. codeblock:: python

with open("/path/to/file", "rb") as fp:
rgbnotes.File.create(file=fp)
rgbnotes.File.list()


Snapshot Request
~~~~~~~~~~
.. codeblock:: python

rgbnotes.Snapshot.retrieve(id)


Account Request
~~~~~~~~~~
.. codeblock:: python

rgbnotes.Account.retrieve()


Webhook Request
~~~~~~~~~~
.. codeblock:: python

rgbnotes.Webhook.modify(url="http://myurl.com/webhook",
secret_header_field="",
secret_header_value="")
rgbnotes.Webhook.list()
rgbnotes.Webhook.delete(id)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rgbnotes-1.2.1-py2-none-any.whl (12.4 kB view details)

Uploaded Python 2

File details

Details for the file rgbnotes-1.2.1-py2-none-any.whl.

File metadata

  • Download URL: rgbnotes-1.2.1-py2-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.19.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.6

File hashes

Hashes for rgbnotes-1.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 32f41f4b359ce94d7ae95e1a48323cafda89c66d14b04b7240ed38ec514bd927
MD5 440dd687beb08d41c272429a90b61b28
BLAKE2b-256 145f1d46e9e9363ee56b53384c17a8a50cd7fa4f3c31678128794dacff824d95

See more details on using hashes here.

Supported by

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