Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contributing to eve-api

Thank you for your interest in contributing! `eve-api` is a minimal
authenticated HTTP client for the EVE (Earth Virtual Expert) API. See
the [README](README.md) for what the project does and how to use it.

## Development setup

Follow the [Installation](README.md#installation) section of the
README, then install the pre-commit hooks:

```bash
poetry run pre-commit install
```

## Code quality

Pre-commit runs black, isort, autoflake, mypy, pylint, detect-secrets,
and pytest with coverage. Run the full suite locally before pushing:

```bash
poetry run pre-commit run --all-files
```

If a hook fails, fix the underlying issue rather than bypassing the
hook. If `detect-secrets` flags a false positive, update the baseline:

```bash
poetry run detect-secrets scan --baseline .secrets.baseline
```

## Testing

```bash
poetry run pytest
```

Tests use [`respx`](https://lundberg.github.io/respx/) to mock the EVE
API, so no live credentials are required. New behaviour should ship
with tests, and coverage is expected to stay at 100%.

## Pull requests

- Fork the repo and branch off `main`.
- Use a short branch prefix: `feat/`, `fix/`, `docs/`, or `chore/` etc.
- Keep each PR focused on one logical change.
- In the PR description, explain *what* changed and *why*, and link
any related issue.
- Commit messages: imperative mood, focused on the *why*.
- Be ready to iterate on review feedback.

## Reporting issues

Open a [GitHub issue](https://github.com/FrontierDevelopmentLab/eve-api/issues)
with:

- steps to reproduce,
- expected vs actual behaviour,
- your environment (Python version, OS, relevant package versions).

## For maintainers

Maintainers can push branches directly to the repo; the same branch
naming, PR, and review expectations apply.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Trillium Technologies Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
81 changes: 71 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
[![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/FrontierDevelopmentLab/eve-api)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)

Minimal authenticated HTTP client for the EVE (Earth Virtual Expert) API.
EVE-API is a minimal authenticated HTTP client for EVE (Earth Virtual Expert).
It provides login, automatic JWT token refresh, and generic HTTP methods that return plain dicts. There are no domain-specific wrappers or Pydantic models.

Provides login, automatic JWT token refresh, and generic HTTP methods that return plain dicts. No domain-specific wrappers or Pydantic models.

## Installation
EVE-API is part of an initiative by [Trillium Technologies](https://trillium.tech/) and ESA to
realize the vision of Earth system predictability (ESP).
You can read about the ESP vision [here](https://eslab.ai/esp).

<!--
```bash
pip install eve-api
```
-->

## Installation

For the development version:
```bash
Expand All @@ -25,6 +24,8 @@ or
pip install -e ".[dev]"
```

Supported Python versions: 3.11–3.14.

## Usage

```python
Expand Down Expand Up @@ -55,10 +56,70 @@ async with EVEClient() as eve:
print(eve.auth_headers)
```

## Configuration

`EVEClient` is configured via constructor arguments — no environment
variables are read.

| Argument | Default | Purpose |
| --- | --- | --- |
| `base_url` | `https://api.eve-chat.chat` | Base URL of the EVE API. |
| `timeout` | `30.0` | Default request timeout in seconds. Per-call timeouts can be passed to individual methods. |

## Authentication

`login()` exchanges email/password for a JWT access token and a
refresh token. Tokens are held in memory on the client instance.

Before every authenticated request, the client refreshes the access
token if it is within 5 minutes of expiry (default expiry: 1 hour);
refresh is lazy, not background. If the refresh token itself has
expired, `TokenExpiredError` is raised and the caller must call
`login()` again.

For unauthenticated endpoints, pass `auth_required=False` to
`request()`.

## Examples

See [`examples/quickstart.py`](examples/quickstart.py) for a runnable
script and [`examples/tutorial.ipynb`](examples/tutorial.ipynb) for a
notebook walk-through.

## Errors

All errors derive from `EVEError`. Common subclasses exported from
`eve_api`: `AuthenticationError`, `NotAuthenticatedError`,
`TokenExpiredError`, `APIError`, `NotFoundError`, `ForbiddenError`,
`ValidationError`, `ServerError`, `StreamError`.

## Running tests

```bash
cd eve-api
pip install -e ".[dev]"
pytest
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup,
pre-commit hooks, and PR conventions.

## Acknowledgements

Originally created by the GeoSTARS (STARS: Scientific Testing of Agentic Reasoning) team:
(
[James Walsh](https://github.com/dead-water),
[Russell Spiewak](https://github.com/r-spiewak),
[Will Fawcett](https://github.com/will-fawcett),
and [Raúl Ramos](https://github.com/rramosp)
).
Supported by the ESA Phi-Lab as part of Trillium Technologies Earth Systems Lab [ESL](https://eslab.ai/).


## License

MIT licensed. See [LICENSE](LICENSE) for the full text.

## Copyright

© 2026 Trillium Technologies Ltd.
Loading