GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - IndicoDataSolutions/indico-client-python: Indico IPA client library

BranchesTags
Open more actions menu

Latest commit

 

History

522 Commits
522 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.harness
.harness
 
 
docs
docs
 
 
docsrc
docsrc
 
 
examples
examples
 
 
indico
indico
 
 
readme_docs
readme_docs
 
 
scripts
scripts
 
 
stubs
stubs
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
AUTHORS
AUTHORS
 
 
CHANGES.txt
CHANGES.txt
 
 
CODEOWNERS
CODEOWNERS
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README.rst
README.rst
 
 
docker-compose.yaml
docker-compose.yaml
 
 
pyproject.toml
pyproject.toml
 
 
tox.Dockerfile
tox.Dockerfile
 
 
tox.ini
tox.ini
 
 
uv.lock
uv.lock
 
 

Repository files navigation

Indico IPA platform Client

A python client library for the Indico IPA Platform.

See the full Documentation.

Installation


Required: Python 3.9+

From PyPI:

pip3 install indico-client

From source:

Using UV (recommended):

# Install UV if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

git clone https://github.com/IndicoDataSolutions/indico-client-python.git
cd indico-client-python
uv pip install -e ".[all]"

Or using pip:

git clone https://github.com/IndicoDataSolutions/indico-client-python.git
cd indico-client-python
pip install -e ".[all]"

Running in a Docker container:

docker build -t indico-client .
docker run -it indico-client bash

Getting Started

Authentication

Indico API token

The Indico Platform and Client Libraries use JSON Web Tokens (JWT) for user authentication. Details on acquiring this token can be found at this documentation

Environment variables

The following environment variables are used for authentication in the default IndicoClient object

  • INDICO_HOST: URL of the IPA instance
  • INDICO_API_TOKEN: user token downloaded from these directions

API Examples

Creating a Client

from indico import IndicoClient, IndicoConfig

config = IndicoConfig(
    host='try.indico.io', # or your custom app location
    api_token_path='./indico_api_token.txt' # path to your API token
    )
client = IndicoClient(config=config)

Pure GraphQL example

from indico import IndicoClient
from indico.client.request import GraphQLRequest

client = IndicoClient()
response = client.call(GraphQLRequest(
    query="""
        query modelGroupQueries($ids: [Int]) {
	        modelGroups(modelGroupIds: $ids){
                modelGroups{
                    id
                }
            }
        }
    """,
    variables={"ids": [1]}
))

model_groups = response["model_groups"]["model_groups"]

Testing the SDK

To run the tests associated with this repo perform the following:

Prerequisite

Ensure you have set the environment variables detailed here

You will also need the following env variables set for the Exchange integration tests:

  • EXCH_TENANT_ID
  • EXCH_CLIENT_ID
  • EXCH_CLIENT_SECRET
  • EXCH_USER_ID

Running the tests

Using UV (recommended):

  1. Install UV if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Install the client and test dependencies uv pip install -e ".[all]" "pytest<8" "requests-mock>=1.8.0" "pytest-asyncio>0.21"
  3. Run tests pytest -sv --host <indico_host> tests/ _ Only run unit tests pytest -sv --host <indico_host> tests/unit/ _ Only run integration tests pytest -sv --host <indico_host> tests/integration/
  4. Check typing
    uv pip install "mypy==1.8" typing_extensions pandas-stubs types-requests types-pytz types-openpyxl
    mypy --config-file=pyproject.toml

Or using pip:

  1. Create a virtual environment python3 -m venv venv
  2. Activate the virtual environment source venv/bin/activate
  3. Install the client pip3 install --editable .[all]
  4. Install test deps pip3 install "pytest<8" "requests-mock>=1.8.0" "pytest-asyncio>0.21"
  5. Run tests pytest -sv --host <indico_host> tests/ _ Only run unit tests pytest -sv --host <indico_host> tests/unit/ _ Only run integration tests pytest -sv --host <indico_host> tests/integration/
  6. Check typing
    pip3 install "mypy==1.8" typing_extensions pandas-stubs types-requests types-pytz types-openpyxl
    mypy --config-file=pyproject.toml

Alternatively, run all the unit tests via docker compose run --rm tester

Contributing

This repository adheres (as best as possible) to the following standards:

  • Python Black Formatter
    • Line Width=88
  • Google Docstrings

About

Indico IPA client library

Resources

Readme
MIT license
Activity
Custom properties

Stars

5 stars

Watchers

16 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.