Skip to main content

Helper library for curvenote versioning and tracking with Jupyter notebooks

Project description

The curvenote Python client library for API access.

Installation

To use this library (in development):

  • Clone the repository

  • Activate your virtual environment

  • pip install -r requirements.txt

  • Retrieve your API_TOKEN from curvenote support

CLI Usage

Access Curvenote projects via the command line. Get help on commands by:

~$ python -m curvenote --help
~$ python -m curvenote COMMAND --help

Command Summary

  • get-me list my user information
    ~$ python -m curvenote get-me API_TOKEN
  • get-my-projects list all projects that the current user has access to
    ~$ python -m curvenote get-my-projects API_TOKEN
  • push upload local documents into a curvenote project. .md (import and update existing) and .ipynb (import new only) files supported
    ~$ python -m curvenote push PATH PROJECT API_TOKEN
  • pull-as-latex create a local latex project and download contents of a Curvenote article into it
    ~$ python -m curvenote push TARGET PROJECT ARTICLE API_TOKEN --version=INTEGER

Python Client Usage

From Python - get curvenote blocks:

>>> import curvenote
>>> session = curvenote.Session(token=API_TOKEN)
>>> session.me()
>>> session.my_projects()
>>> session.get_block_latest(PROJECT_ID, BLOCK_ID)
>>> ...

From Python - push a local folder to a curvenote project:

>>> import curvenote
>>> session = curvenote.Session(token=AUTHORIZATION_TOKEN)
>>> proj = session.get_project("My Cool Project")
>>> session.push_folder("./cool_stuff/", proj)
>>> ...

There is also limited CLI functionality, though this still requires the Python installation:

Documentation

To build the documentation: * Clone the repository * Activate your virtual environment * pip install -r requirements_dev.txt * make docs

HTML doc pages will be written to ./build/html/

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

curvenote-0.0.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

curvenote-0.0.1-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file curvenote-0.0.1.tar.gz.

File metadata

  • Download URL: curvenote-0.0.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.6

File hashes

Hashes for curvenote-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b7e087b53bb1073995d5d419c86fc34cb1c3311ad1acb8517354dc38781c3e12
MD5 915f2467a71f6733f3fb4e9ba63027d1
BLAKE2b-256 6eed2e02eb5375cd1b6dd84f35fdeba96f2881b65d9a8265fa21601209178338

See more details on using hashes here.

Provenance

File details

Details for the file curvenote-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: curvenote-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.6

File hashes

Hashes for curvenote-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb973e96c86f436090649f41e9ce30ca2defa3055a982122212caf043b706a1
MD5 61c8e4f83847ab331b3950a5b22cb67c
BLAKE2b-256 7aebf38e98204f37f94a1aa941cb1a3fc614ab4844c66296f1f5d2284e9c9baa

See more details on using hashes here.

Provenance

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