Skip to content

Commit e9dd5b2

Browse files
committed
SDK Generation
1 parent 409c348 commit e9dd5b2

31 files changed

+364
-348
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.113.1",
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: 3 additions & 7 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
@@ -55,7 +51,7 @@ jobs:
5551
- name: Publish to pypi
5652
run: |
5753
poetry config repositories.remote https://upload.pypi.org/legacy/
58-
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
54+
poetry --no-interaction -v publish --build --repository remote --username "$__token__" --password "$"
5955
env:
60-
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
61-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
56+
__token__: ${{ secrets.__token__ }}
57+
: ${{ secrets. }}

LICENSE

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

README.md

Lines changed: 1 addition & 12 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.
@@ -11,25 +10,15 @@ The Lattice SDK Python library provides convenient access to the Lattice SDK API
1110

1211
API reference documentation is available [here](https://developer.anduril.com/).
1312

14-
## Requirements
15-
16-
To use the SDK please ensure you have the following installed:
17-
18-
* [Python 3](https://www.python.org/doc/versions)
19-
2013
## Installation
2114

2215
```sh
2316
pip install anduril-lattice-sdk
2417
```
2518

26-
## Support
27-
28-
For support with this library please reach out to your Anduril representative.
29-
3019
## Reference
3120

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

3423
## Usage
3524

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: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@ name = "anduril-lattice-sdk"
33

44
[tool.poetry]
55
name = "anduril-lattice-sdk"
6-
version = "2.3.0"
7-
description = "HTTP clients for the Anduril Lattice SDK"
6+
version = "0.0.1"
7+
description = ""
88
readme = "README.md"
9-
authors = [
10-
"Anduril Industries <[email protected]>"
11-
]
12-
keywords = [
13-
"anduril",
14-
"lattice"
15-
]
9+
authors = []
10+
keywords = []
1611

1712
classifiers = [
1813
"Intended Audience :: Developers",
@@ -35,15 +30,12 @@ packages = [
3530
{ include = "anduril", from = "src"}
3631
]
3732

38-
[project.urls]
39-
Documentation = 'https://developer.anduril.com'
40-
Homepage = 'https://www.anduril.com/lattice-sdk/'
41-
Repository = 'https://github.com/anduril/lattice-sdk-python'
33+
[tool.poetry.urls]
34+
Repository = 'https://github.com/fern-api/lattice-sdk-python'
4235

4336
[tool.poetry.dependencies]
4437
python = "^3.8"
4538
httpx = ">=0.21.2"
46-
httpx-sse = "0.4.0"
4739
pydantic = ">= 1.9.2"
4840
pydantic-core = ">=2.18.2"
4941
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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ 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",
2625
"X-Fern-Language": "Python",
2726
"X-Fern-SDK-Name": "anduril-lattice-sdk",
28-
"X-Fern-SDK-Version": "2.3.0",
27+
"X-Fern-SDK-Version": "0.0.1",
2928
**(self.get_custom_headers() or {}),
3029
}
3130
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)