Skip to main content

Upsource API

Project description

Upsource API

A Python client library for accessing Upsource APIs. These client library are not complete and are in developing mode.

Index

  1. Install
  2. Usage

Install

You can run Upsource API through Docker:

docker run -it --rm vanyaland/upsourceapi --help

Build by your own:

docker build -t upsourceapi .
docker run -it --rm upsourceapi --help

or install it using the Python package manager:

pip install .

Usage

Command line usage

In this section we cover in detail each of the commands implemented in upsourceapi.

upsourceapi --help

Commands

Get all projects

With this command you can the list of all short project infos.

  • --base-url: Base URL of the Upsource API.
  • --auth-token: Upsource authorization token, provide it to see private projects. optional

Example:

upsourceapi get-all-projects \
  --base-url "https://example.com/~rpc" \
  --auth-token "AUTH_TOKEN"

Create a project

You must have configured your SSH previously.

With this command you can create upsource project.

  • --base-url: Base URL of the Upsource API.
  • --auth-token: Upsource authorization token. To see private projects.
  • --project-name: Name for the new Upsource project.
  • --project-url: The URL to the repo, e.g. ssh://git@example.com/example-repo.git.
  • --ssh-key: Private SSH key in OpenSSH format.
  • --ssh-key-passphrase: SSH key passphrase.
  • --sync-token: Anonymous access to the GitLab/GitHub API is forbidden. Please provide an OAuth 2.0 token (recommended) or a personal access token, which we'll use to read data from GitLab/GitHub. Write requests will be performed on behalf of each individual Upsource user.

Example:

upsourceapi create-project \
  --auth-token "AUTH_TOKEN" \
  --base-url "https://example.com/~rpc" \
  --project-name "example-project" \
  --project-url "ssh://git@example.com/example-project.git" \
  --ssh-key "$(cat ~/.ssh/id_rsa)" \
  --ssh-key-passphrase "ssh-key-passphrase" \
  --sync-token "OAuth 2.0 token"

Find projects

With this command you can get the list of projects matching a given search criteria.

  • --base-url: Base URL of the Upsource API.
  • --auth-token: Upsource authorization token, provide it to see private projects. optional
  • --pattern: Search query, e.g. part of the name.
  • --limit: Number of projects to return.

Example:

docker run -it --rm upsourceapi find-projects \
  --base-url "https://example.com/~rpc" \
  --auth-token "AUTH_TOKEN" \
  --pattern "query" \
  --limit 10

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

upsourceapi-0.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

upsourceapi-0.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file upsourceapi-0.1.tar.gz.

File metadata

  • Download URL: upsourceapi-0.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for upsourceapi-0.1.tar.gz
Algorithm Hash digest
SHA256 d491192f2ddf113badd0ad24962938f99db70299889a7f46a9f5f67f50ac28cc
MD5 ee0a24366de3b793276779a1a445427e
BLAKE2b-256 b1b6d63fd24a85c9f898a234b45a12b0e553b0ed4a18d1318db809ff1b2c3ec0

See more details on using hashes here.

File details

Details for the file upsourceapi-0.1-py3-none-any.whl.

File metadata

  • Download URL: upsourceapi-0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for upsourceapi-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1d7c3139f816b7a7e2f7d80acd540ad370937a7ec8bf1cabd4619a607e5425d
MD5 03d9ab70b68e2331d63512e25b96b529
BLAKE2b-256 da765c0f9020907530697b8166d7a058a6db727ced1e4baa32b902a71639a419

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