Skip to main content
# RGB Notes Python Library

[![CircleCI](https://circleci.com/gh/rgbnotes/rgb-api-python.svg?style=svg)](https://circleci.com/gh/rgbnotes/rgb-api-python)

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.

## Documentation

See the [API docs](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:

``` {.sourceCode .bash}
pip install --upgrade rgbnotes
```

Install from source with:

``` {.sourceCode .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

``` {.sourceCode .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:

``` {.sourceCode .python}
CLS.create()
CLS.list()
CLS.retrieve(id)
CLS.modify(id, **data)
CLS.delete(id)
```

## Projects Request

``` {.sourceCode .python}
rgbnotes.Project.create(title="New Project")
rgbnotes.Project.list()
rgbnotes.Project.modify(2, title="New Project Title")
rgbnotes.Project.delete(2)
```


## Assets Request

``` {.sourceCode .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

``` {.sourceCode .python}
# requires a project Token or project_id parameter
rgbnotes.Note.list()
```


## Users Request

``` {.sourceCode .python}
rgbnotes.User.create(name="John Doe", email="john@doe.com")
rgbnotes.User.list()
```

## File Request

``` {.sourceCode .python}
fp = open("/path/to/file", "rb")
rgbnotes.File.create(file=fp)
rgbnotes.File.list()
```

## Snapshot Request

``` {.sourceCode .python}
rgbnotes.Snapshot.retrieve(id)
```


## Account Request

``` {.sourceCode .python}
rgbnotes.Account.retrieve()
```

## Alias Request

``` {.sourceCode .python}
rgbnotes.Alias.list()
rgbnotes.Alias.create(entity_type='projects',
entity_id=4,
alias=123)
rgbnotes.Alias.modify(id, alias_id)
rgbnotes.Alias.delete(id)
```


## Webhook Request

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


Metadata

Release files for rgbnotes 1.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rgbnotes 1.2.11
File Size Uploaded Provenance
rgbnotes-1.2.11.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rgbnotes 1.2.11
File Interpreter ABI Platform
rgbnotes-1.2.11-py2-none-any.whl Python 2 none any Details

Total release size: 19.6 kB

Release files / rgbnotes-1.2.11.tar.gz

Download URL rgbnotes-1.2.11.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5bbf778f8449732ca9e3ee5a4b078eebe080377a965617c8e695a343b077198c
BLAKE2b-256 checksum
How to use checksums
ec401e0fbd9a8ffe2f8566cbebbd5041f099ae401cf163020d34796584a5665c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release files / rgbnotes-1.2.11-py2-none-any.whl

Download URL rgbnotes-1.2.11-py2-none-any.whl
Size 13.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
8a31581aab84c49b11cf120fa0da2d474c5715bdcac9b4fc7ec81660dccd480b
BLAKE2b-256 checksum
How to use checksums
240ccd909fc231f37a40d4d2dcf3d3e4db74bf86f5591e5145aabd461384af7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for rgbnotes 1.2.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page