|
4 | 4 | [](https://github.com/FrontierDevelopmentLab/eve-api) |
5 | 5 | [](LICENSE) |
6 | 6 |
|
7 | | -Minimal authenticated HTTP client for the EVE (Earth Virtual Expert) API. |
| 7 | +EVE-API is a minimal authenticated HTTP client for EVE (Earth Virtual Expert). |
| 8 | +It provides login, automatic JWT token refresh, and generic HTTP methods that return plain dicts. There are no domain-specific wrappers or Pydantic models. |
8 | 9 |
|
9 | | -Provides login, automatic JWT token refresh, and generic HTTP methods that return plain dicts. No domain-specific wrappers or Pydantic models. |
10 | 10 |
|
11 | | -## Installation |
| 11 | +EVE-API is part of an initiative by [Trillium Technologies](https://trillium.tech/) and ESA to |
| 12 | +realize the vision of Earth system predictability (ESP). |
| 13 | +You can read about the ESP vision [here](https://eslab.ai/esp). |
12 | 14 |
|
13 | | -<!-- |
14 | | -```bash |
15 | | -pip install eve-api |
16 | | -``` |
17 | | ---> |
| 15 | + |
| 16 | +## Installation |
18 | 17 |
|
19 | 18 | For the development version: |
20 | 19 | ```bash |
|
25 | 24 | pip install -e ".[dev]" |
26 | 25 | ``` |
27 | 26 |
|
| 27 | +Supported Python versions: 3.11–3.14. |
| 28 | + |
28 | 29 | ## Usage |
29 | 30 |
|
30 | 31 | ```python |
@@ -55,10 +56,66 @@ async with EVEClient() as eve: |
55 | 56 | print(eve.auth_headers) |
56 | 57 | ``` |
57 | 58 |
|
| 59 | +## Configuration |
| 60 | + |
| 61 | +`EVEClient` is configured via constructor arguments — no environment |
| 62 | +variables are read. |
| 63 | + |
| 64 | +| Argument | Default | Purpose | |
| 65 | +| --- | --- | --- | |
| 66 | +| `base_url` | `https://api.eve-chat.chat` | Base URL of the EVE API. | |
| 67 | +| `timeout` | `30.0` | Default request timeout in seconds. Per-call timeouts can be passed to individual methods. | |
| 68 | + |
| 69 | +## Authentication |
| 70 | + |
| 71 | +`login()` exchanges email/password for a JWT access token and a |
| 72 | +refresh token. Tokens are held in memory on the client instance. |
| 73 | + |
| 74 | +Before every authenticated request, the client refreshes the access |
| 75 | +token if it is within 5 minutes of expiry (default expiry: 1 hour); |
| 76 | +refresh is lazy, not background. If the refresh token itself has |
| 77 | +expired, `TokenExpiredError` is raised and the caller must call |
| 78 | +`login()` again. |
| 79 | + |
| 80 | +For unauthenticated endpoints, pass `auth_required=False` to |
| 81 | +`request()`. |
| 82 | + |
| 83 | +## Examples |
| 84 | + |
| 85 | +See [`examples/quickstart.py`](examples/quickstart.py) for a runnable |
| 86 | +script and [`examples/tutorial.ipynb`](examples/tutorial.ipynb) for a |
| 87 | +notebook walk-through. |
| 88 | + |
| 89 | +## Errors |
| 90 | + |
| 91 | +All errors derive from `EVEError`. Common subclasses exported from |
| 92 | +`eve_api`: `AuthenticationError`, `NotAuthenticatedError`, |
| 93 | +`TokenExpiredError`, `APIError`, `NotFoundError`, `ForbiddenError`, |
| 94 | +`ValidationError`, `ServerError`, `StreamError`. |
| 95 | + |
58 | 96 | ## Running tests |
59 | 97 |
|
60 | 98 | ```bash |
61 | | -cd eve-api |
62 | | -pip install -e ".[dev]" |
63 | 99 | pytest |
64 | 100 | ``` |
| 101 | + |
| 102 | +## Contributing |
| 103 | + |
| 104 | +See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, |
| 105 | +pre-commit hooks, and PR conventions. |
| 106 | + |
| 107 | +## Acknowledgements |
| 108 | + |
| 109 | +Originally created by the GeoSTARS (STARS: Scientific Testing of Agentic Reasoning) team: |
| 110 | +([Raúl Ramos](https://github.com/rramosp), [James Walsh](https://github.com/dead-water), |
| 111 | +[Will Fawcett](https://github.com/will-fawcett), and [Russell Spiewak](https://github.com/r-spiewak)). |
| 112 | +Supported by the ESA Phi-Lab as part of Trillium Technologies Earth Systems Lab [ESL](https://eslab.ai/). |
| 113 | + |
| 114 | + |
| 115 | +## License |
| 116 | + |
| 117 | +MIT licensed. See [LICENSE](LICENSE) for the full text. |
| 118 | + |
| 119 | +## Copyright |
| 120 | + |
| 121 | +© 2026 Trillium Technologies Ltd. |
0 commit comments