Skip to content
Open
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
7 changes: 4 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"cliVersion": "3.5.0",
"cliVersion": "3.39.0",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.38.4",
"generatorVersion": "4.46.14",
"generatorConfig": {
"client_class_name": "Lattice",
"package_name": "anduril"
}
},
"sdkVersion": "5.0.0"
}
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The Lattice SDK Python library provides convenient access to the Lattice SDK API
- [Exception Handling](#exception-handling)
- [Streaming](#streaming)
- [Pagination](#pagination)
- [Oauth Token Override](#oauth-token-override)
- [Advanced](#advanced)
- [Access Raw Response Data](#access-raw-response-data)
- [Retries](#retries)
Expand Down Expand Up @@ -56,7 +57,8 @@ Instantiate and use the client with the following:
from anduril import Lattice

client = Lattice(
token="YOUR_TOKEN",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
client.entities.long_poll_entity_events(
session_token="sessionToken",
Expand All @@ -73,7 +75,8 @@ import asyncio
from anduril import AsyncLattice

client = AsyncLattice(
token="YOUR_TOKEN",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)


Expand Down Expand Up @@ -109,7 +112,8 @@ The SDK supports streaming responses, as well, the response will be a generator
from anduril import Lattice

client = Lattice(
token="YOUR_TOKEN",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.entities.stream_entities()
for chunk in response.data:
Expand All @@ -124,7 +128,8 @@ Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used
from anduril import Lattice

client = Lattice(
token="YOUR_TOKEN",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.objects.list_objects()
for item in response:
Expand All @@ -143,6 +148,24 @@ for page in pager.iter_pages():
print(item)
```

## Oauth Token Override

This SDK supports two authentication methods: OAuth client credentials flow (automatic token management) or direct bearer token authentication. You can choose between these options when initializing the client:

```python
from anduril import Lattice

# Option 1: Direct bearer token (bypass OAuth flow)
client = Lattice(..., token="my-pre-generated-bearer-token")

from anduril import Lattice

# Option 2: OAuth client credentials flow (automatic token management)
client = Lattice(
..., client_id="your-client-id", client_secret="your-client-secret"
)
```

## Advanced

### Access Raw Response Data
Expand Down
97 changes: 51 additions & 46 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "anduril-lattice-sdk"
dynamic = ["version"]

[tool.poetry]
name = "anduril-lattice-sdk"
version = "4.0.0"
version = "5.0.0"
description = "HTTP clients for the Anduril Lattice SDK"
readme = "README.md"
authors = [
Expand Down
Loading