Skip to content

Commit ba4e31f

Browse files
committed
SDK Generation
1 parent 409c348 commit ba4e31f

28 files changed

+558
-488
lines changed

.fern/metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"cliVersion": "0.0.0",
3+
"generatorName": "fernapi/fern-python-sdk",
4+
"generatorVersion": "99.99.99",
5+
"generatorConfig": {
6+
"client_class_name": "Lattice",
7+
"package_name": "anduril"
8+
}
9+
}

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
name: ci
2-
32
on: [push]
43
jobs:
5-
compile:
64
runs-on: ubuntu-latest
75
steps:
86
- name: Checkout repo
97
uses: actions/checkout@v4
108
- name: Set up python
119
uses: actions/setup-python@v4
1210
with:
13-
python-version: 3.8
14-
- name: Bootstrap poetry
1511
run: |
1612
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
1713
- name: Install dependencies

LICENSE

Lines changed: 0 additions & 189 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
![](https://www.anduril.com/lattice-sdk/)
44

5-
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fanduril%2Flattice-sdk-python)
65
[![pypi](https://img.shields.io/pypi/v/anduril-lattice-sdk)](https://pypi.python.org/pypi/anduril-lattice-sdk)
76

87
The Lattice SDK Python library provides convenient access to the Lattice SDK APIs from Python.
@@ -29,7 +28,7 @@ For support with this library please reach out to your Anduril representative.
2928

3029
## Reference
3130

32-
A full reference for this library is available [here](https://github.com/anduril/lattice-sdk-python/blob/HEAD/./reference.md).
31+
A full reference for this library is available [here](https://github.com/fern-api/lattice-sdk-python/blob/HEAD/./reference.md).
3332

3433
## Usage
3534

poetry.lock

Lines changed: 51 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "anduril-lattice-sdk"
33

44
[tool.poetry]
55
name = "anduril-lattice-sdk"
6-
version = "2.3.0"
6+
version = "3.1.2"
77
description = "HTTP clients for the Anduril Lattice SDK"
88
readme = "README.md"
99
authors = [
@@ -35,15 +35,14 @@ packages = [
3535
{ include = "anduril", from = "src"}
3636
]
3737

38-
[project.urls]
38+
[tool.poetry.urls]
3939
Documentation = 'https://developer.anduril.com'
4040
Homepage = 'https://www.anduril.com/lattice-sdk/'
41-
Repository = 'https://github.com/anduril/lattice-sdk-python'
41+
Repository = 'https://github.com/fern-api/lattice-sdk-python'
4242

4343
[tool.poetry.dependencies]
4444
python = "^3.8"
4545
httpx = ">=0.21.2"
46-
httpx-sse = "0.4.0"
4746
pydantic = ">= 1.9.2"
4847
pydantic-core = ">=2.18.2"
4948
typing_extensions = ">= 4.0.0"

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
httpx>=0.21.2
2-
httpx-sse==0.4.0
32
pydantic>= 1.9.2
43
pydantic-core>=2.18.2
54
typing_extensions>= 4.0.0

src/anduril/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "anduril-lattice-sdk/2.3.0",
25+
"User-Agent": "anduril/3.1.2",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "anduril-lattice-sdk",
28-
"X-Fern-SDK-Version": "2.3.0",
28+
"X-Fern-SDK-Version": "3.1.2",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
token = self._get_token()
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+
5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from ._api import EventSource, aconnect_sse, connect_sse
10+
from ._exceptions import SSEError
11+
from ._models import ServerSentEvent
12+
_dynamic_imports: typing.Dict[str, str] = {
13+
"EventSource": "._api",
14+
"SSEError": "._exceptions",
15+
"ServerSentEvent": "._models",
16+
"aconnect_sse": "._api",
17+
"connect_sse": "._api",
18+
}
19+
20+
21+
def __getattr__(attr_name: str) -> typing.Any:
22+
module_name = _dynamic_imports.get(attr_name)
23+
if module_name is None:
24+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
25+
try:
26+
module = import_module(module_name, __package__)
27+
if module_name == f".{attr_name}":
28+
return module
29+
else:
30+
return getattr(module, attr_name)
31+
except ImportError as e:
32+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
33+
except AttributeError as e:
34+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
35+
36+
37+
def __dir__():
38+
lazy_attrs = list(_dynamic_imports.keys())
39+
return sorted(lazy_attrs)
40+
41+
42+
__all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"]

0 commit comments

Comments
 (0)