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.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.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upsourceapi-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7339337bf0d2b08378b994f51e9dc653afd8c030f9fe23de28bc52d1348ae05e
MD5 5487c494d040de5a15a50fb93364d4ec
BLAKE2b-256 8bb4b6b11c08036a1e99bfd81f09bb3ad68be2d18b86911c6102754e0e6aca65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: upsourceapi-0.1.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b212ea576bf241f47c49cd32609b5bc2727bb412ebf4ef3749602030ba543c5
MD5 bcca292ad9eda450a692b7904db28302
BLAKE2b-256 beaff7a9e9de70e7ab3676c9ee4ca09b2bfdea762a9c72bf29ef5d63a3f1d5f1

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