Skip to main content

ViQi API

Low level interface to ViQi services

Install

pip install viqi-api

Configuration

For command line tools create ~/.config/viqi/profiles or `~/config/viqi/profiles`` (windows) with the following

[default]
host=https://science.viqiai.cloud
user=myuser
password=mysecret

[science-user2]
host=https://science.viqiai.cloud
user=myuser2
password=mysecret2

# Admin can switch to another user
[science-secret-user]
host=https://science.viqiai.cloud
user=admin@viqi.org
password=admin_secret
alias=secret-user@viqi.org

Documentation

Usage & Initialization

The viqi_session helper provides a flexible way to initialize a session, whether from command line arguments, configuration files, or direct parameters in Python.

1. From Command Line Arguments (Scripts)

When used in a script without arguments, viqi_session() automatically parses sys.argv. This is the standard way to write scripts that can be configured via flags or config files.

myscript.py:

from vqapi import viqi_session
session = viqi_session()

if session:
    # Session is ready and connected
    print(f"Connected to {session.bqServer} as {session.user}")

    # Access services
    meta = session.service("meta")
    # ...

Run it:

# Using explicit credentials
python myscript.py --host https://science.viqiai.cloud --user myuser --password mysecret

# Using a profile defined in ~/.config/viqi/profiles
python myscript.py --profile default

2. From Python Parameters (Interactive/Library)

You can pass arguments directly as keyword arguments. This is useful for interactive sessions (like IPython/Jupyter) or when embedding the library.

from vqapi import viqi_session

# Using a profile defined in ~/.config/viqi/profiles
session = viqi_session(profile="science-user2")

# Using explicit credentials
session = viqi_session(
    host="https://science.viqiai.cloud",
    user="myuser",
    password="mysecret"
)

# Using an auth token
session = viqi_session(
    host="https://science.viqiai.cloud",
    authtoken="YOUR_AUTH_TOKEN"
)

3. Simulating Command Line Arguments

You can pass a list of strings to args to simulate command line input.

session = viqi_session(args=["--host", "https://science.viqiai.cloud", "--user", "admin", "--password", "secret"])

4. Custom Argument Parser

If your script requires its own custom arguments, you can extend the standard ViQi parser.

import argparse
from vqapi import viqi_session, viqi_argument_parser

# 1. Start with the standard ViQi parser
parser = viqi_argument_parser()

# 2. Add your custom arguments
parser.add_argument("--dataset-id", required=True, help="ID of dataset to process")

# 3. Parse args (handles both ViQi args and custom args)
args = parser.parse_args()

# 4. Initialize session using the parsed arguments
session = viqi_session(args=args)

# 5. Use your custom argument
print(f"Processing dataset: {args.dataset_id}")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

viqi_api-0.6.53-py3-none-any.whl (102.3 kB view details)

Uploaded Python 3

File details

Details for the file viqi_api-0.6.53-py3-none-any.whl.

File metadata

  • Download URL: viqi_api-0.6.53-py3-none-any.whl
  • Upload date:
  • Size: 102.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for viqi_api-0.6.53-py3-none-any.whl
Algorithm Hash digest
SHA256 cd06fd0c64c5e0148d907055979e1d2054805fa37f4be90fca0811f25b2dbcce
MD5 74e8ff0f9d2bac7080f8e18d46aa0977
BLAKE2b-256 63a327990ef9e16723ed4193c5c36b3685ee161fe737ef349396f7a6c21650d5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.54

1 file

This release

0.6.53 This release

1 file

0.6.52

1 file

0.6.51

1 file

0.6.50

1 file

0.6.49

1 file

0.6.48

1 file

0.6.47

1 file

0.6.45

1 file

0.6.44

1 file

0.6.43

1 file

0.6.42

1 file

0.6.41

1 file

0.6.40

1 file

0.6.39

1 file

0.6.38

1 file

0.6.37

1 file

0.6.36

1 file

0.6.35

1 file

0.6.34

1 file

0.6.33

1 file

0.6.32

1 file

0.6.31

1 file

0.6.30

1 file

0.6.29

1 file

0.6.28

1 file

0.6.27

1 file

0.6.26

1 file

0.6.25

1 file

0.6.24

1 file

0.6.23

1 file

0.6.22

1 file

0.6.21

1 file

0.6.20

1 file

0.6.19

1 file

0.6.18

1 file

0.6.16

1 file

0.6.15

1 file

0.6.14

1 file

0.6.13

1 file

0.6.12

1 file

0.6.11.6

1 file

0.6.11.5

1 file

0.6.11.4

1 file

0.6.11.3

1 file

0.6.11.2

1 file

0.6.11.1

1 file

0.6.11

1 file

0.6.10.9

1 file

0.6.10.8

1 file

0.6.10.7

1 file

0.6.10.6

1 file

0.6.10.4

1 file

0.6.10.3

1 file

0.6.10.2

1 file

0.6.10.1

1 file

0.6.10

1 file

0.6.9.9

1 file

0.6.9.8

1 file

0.6.9.7

1 file

0.6.9.6

1 file

0.6.9.5

1 file

0.6.9.4

1 file

0.6.9.3

1 file

0.6.9.2

1 file

0.6.9.1

1 file

0.6.9

1 file

0.6.8.9

1 file

0.6.8.8

1 file

0.6.8.7

1 file

0.6.8.6

1 file

0.6.8.4

1 file

0.6.8.3

1 file

0.6.8.2

1 file

0.6.8.1

1 file

0.6.8

1 file

0.6.7.9

1 file

0.6.7.8

1 file

0.6.7.7

1 file

0.6.7.6

1 file

0.6.7.5

1 file

0.6.7.4

1 file

0.6.7.3

1 file

0.6.7.2

1 file

0.6.7.1

1 file

0.6.7

1 file

0.6.6.11

1 file

0.6.6.10

1 file

0.6.6.9

1 file

0.6.6.8

1 file

0.6.6.7

1 file

0.6.6.6

1 file

0.6.6.5

1 file

0.6.6.4

1 file

0.6.6.2

1 file

0.6.6.1

1 file

0.6.5.16

1 file

0.6.5.15

1 file

0.6.5.14

1 file

0.6.5.13

1 file

0.6.5.12

1 file

0.6.5.11

1 file

0.6.5.10

1 file

0.6.5.9

1 file

0.6.5.8

1 file

0.6.5.7

1 file

0.6.5.6

1 file

0.6.5.3

1 file

0.6.5.2

1 file

0.6.5.1

1 file

0.6.5.0

1 file

0.6.4.89

1 file

0.6.4.88

1 file

0.6.4.87

1 file

0.6.4.86

1 file

0.6.4.85

1 file

0.6.4.84

1 file

0.6.4.83

1 file

0.6.4.82

1 file

0.6.4.81

1 file

0.6.4.80

1 file

0.6.4.79

1 file

0.6.4.78

1 file

0.6.4.77

1 file

0.6.4.76

1 file

0.6.4.75

1 file

0.6.4.74

1 file

0.6.4.73

1 file

0.6.4.72

1 file

0.6.4.71

1 file

0.6.4.70

1 file

0.6.4.69

1 file

0.6.4.68

1 file

0.6.4.67

1 file

0.6.4.66

1 file

0.6.4.65

1 file

0.6.4.64

1 file

0.6.4.63

1 file

0.6.4.62

1 file

0.6.4.61

1 file

0.6.4.60

1 file

0.6.4.59

1 file

0.6.4.58

1 file

0.6.4.57

1 file

0.6.4.56

1 file

0.6.4.55

1 file

0.6.4.54

1 file

0.6.4.53

1 file

0.6.4.52

1 file

0.6.4.51

1 file

0.6.4.50

1 file

0.6.4.48

1 file

0.6.4.47

1 file

0.6.4.46

1 file

0.6.4.45

1 file

0.6.4.44

1 file

0.6.4.43

1 file

0.6.4.36

1 file

0.6.4.35

1 file

0.6.4.34

1 file

0.6.4.33

1 file

0.6.4.30

1 file

0.6.4.29

1 file

0.6.4.28

1 file

0.6.4.27

1 file

0.6.4.26

1 file

0.6.4.25

1 file

0.6.4.24

1 file

0.6.4.23

1 file

0.6.4.22

1 file

0.6.4.21

1 file

0.6.4.20

1 file

0.6.4.19

1 file

0.6.4.18

1 file

0.6.4.16

1 file

0.6.4.14

1 file

0.6.4.13

1 file

0.6.4.12

1 file

0.6.4.10

1 file

0.6.4.9

1 file

0.6.4.8

1 file

0.6.4.7

1 file

0.6.4.6

1 file

0.6.4.5

1 file

0.6.4.4

1 file

0.6.4.3

1 file

0.6.4.2

1 file

0.6.4.1

1 file

0.6.4.0

1 file

0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page