Skip to content

Examples showing how to interact with the PipeBio REST API through python SDK.

License

Notifications You must be signed in to change notification settings

pipebio/api-examples

Repository files navigation

CI

API Examples

  • Examples showing how to interact with the Pipe|bio REST api through python.
  • See https://docs.pipebio.com for full API documentation.
  • See PyPi for our SDK which wraps some methods in the API
  • Examples currently wrap our API endpoints in python only, you can of course use the endpoints in any language (java, javascript, c#, etc)
  • All endpoints are under heavy development and subject to change. Use at your own risk.

Installation

  • Python3 or just brew install python@3.7
  • Install uv: pip install uv or follow uv installation guide
  • Create a virtual environment and install dependencies in one step: uv venv && source venv/bin/activate && uv pip install -r requirements.txt
  • Alternatively, step by step:
    • Create a virtual environment: uv venv
    • Activate the venv: source venv/bin/activate
    • Install dependencies: uv pip install -r requirements.txt

Getting started

  • Check out the files with names in the examples directory; to run them use python examples/upload_fasta.py for example.
  • Before running the examples, make sure to set the required environment variables:
    export TARGET_FOLDER_ID="your_folder_id"
    export TARGET_SHAREABLE_ID="your_shareable_id"
    export TARGET_DOCUMENT_ID="your_document_id"
  • Please contact support@pipebio.com for help.

Running Tests

To ensure these examples work correctly, we have integration tests that run each example:

# Install pytest
uv pip install pytest

# Run the integration tests
python -m pytest -c pytest.ini -v

The tests will check that each example script can run to completion without errors.

Contributing

  • Issues and pull requests are welcome.

About

Examples showing how to interact with the PipeBio REST API through python SDK.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •