Metadata-Version: 2.4
Name: vigilfield
Version: 0.1.0
Summary: Python SDK for the Vigilfield API
Project-URL: Documentation, https://vigilfield.com/docs
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.21.2
Requires-Dist: pydantic>=1.9.2
Requires-Dist: pydantic-core>=2.18.2
Requires-Dist: typing_extensions>=4.0.0
Provides-Extra: aiohttp
Requires-Dist: aiohttp<4,>=3.10.0; extra == "aiohttp"
Requires-Dist: httpx-aiohttp>=0.1.8; extra == "aiohttp"

# Vigilfield Python SDK

The Python client for the Vigilfield API.

```sh
pip install vigilfield
```

It needs Python 3.9 or later.

## Use your `vf login` sign-in

Sign in once with the command line (`vf login --org <slug>`). A script then
needs no credential of its own:

```python
from vigilfield_login import client

vigilfield = client()          # your default organization, or client("acme")
for table in vigilfield.tables.table_list():
    print(table.name)
```

The sign-in lasts 24 hours. After that, calls raise `LoginError` until you run
`vf login` again.

## Use an app's client

For a job that runs without a person, install an app in your organization and
use its client:

```python
from vigilfield import Vigilfield

vigilfield = Vigilfield(
    base_url="https://<slug>.vigilfield.com/api/v1",
    client_id="...",
    client_secret="...",
)
```

`AsyncVigilfield` is the same client for `asyncio`.

## Reference

Every operation is listed in [`vigilfield/reference.md`](vigilfield/reference.md),
and in the API reference at [vigilfield.com/docs](https://vigilfield.com/docs).

This repository is published from Vigilfield's own source. Changes made here
are overwritten by the next release.
