Skip to content

Commit

Permalink
Merge branch 'main' of github.com:unkeyed/unkey-py
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Oct 28, 2024
2 parents ee16cf4 + 267417c commit 1465e9a
Show file tree
Hide file tree
Showing 101 changed files with 2,231 additions and 292 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<div align="center">
<a href="https://codespaces.new/unkeyed/unkey-py.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>

> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
Expand Down
45 changes: 43 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ management:
docVersion: 1.0.0
speakeasyVersion: 1.422.1
generationVersion: 2.438.15
releaseVersion: 0.1.0
configChecksum: beaad268bb8c745122cb865db76c6bf5
releaseVersion: 0.1.1
configChecksum: 9c66e586ba01918c7530870d3cdb2ecb
repoURL: https://github.com/unkeyed/unkey-py.git
installationURL: https://github.com/unkeyed/unkey-py.git
published: true
features:
python:
additionalDependencies: 1.0.0
Expand Down Expand Up @@ -42,38 +45,51 @@ generatedFiles:
- USAGE.md
- docs/models/addpermissionspermissions.md
- docs/models/addpermissionsrequestbody.md
- docs/models/addpermissionsresponse.md
- docs/models/addrolesrequestbody.md
- docs/models/addrolesresponse.md
- docs/models/addrolesresponsebody.md
- docs/models/addrolesroles.md
- docs/models/and_.md
- docs/models/authorization.md
- docs/models/code.md
- docs/models/createapirequestbody.md
- docs/models/createapiresponse.md
- docs/models/createapiresponsebody.md
- docs/models/createidentityratelimits.md
- docs/models/createidentityrequestbody.md
- docs/models/createidentityresponse.md
- docs/models/createidentityresponsebody.md
- docs/models/createkeyinterval.md
- docs/models/createkeyratelimit.md
- docs/models/createkeyrefill.md
- docs/models/createkeyrequestbody.md
- docs/models/createkeyresponse.md
- docs/models/createkeyresponsebody.md
- docs/models/createkeytype.md
- docs/models/createpermissionrequestbody.md
- docs/models/createpermissionresponse.md
- docs/models/createpermissionresponsebody.md
- docs/models/createrolerequestbody.md
- docs/models/createroleresponse.md
- docs/models/createroleresponsebody.md
- docs/models/deleteapirequestbody.md
- docs/models/deleteapiresponse.md
- docs/models/deleteapiresponsebody.md
- docs/models/deleteidentityrequestbody.md
- docs/models/deleteidentityresponse.md
- docs/models/deleteidentityresponsebody.md
- docs/models/deletekeyrequestbody.md
- docs/models/deletekeyresponse.md
- docs/models/deletekeyresponsebody.md
- docs/models/deletekeysrequestbody.md
- docs/models/deletekeysresponse.md
- docs/models/deletekeysresponsebody.md
- docs/models/deletepermissionrequestbody.md
- docs/models/deletepermissionresponse.md
- docs/models/deletepermissionresponsebody.md
- docs/models/deleterolerequestbody.md
- docs/models/deleteroleresponse.md
- docs/models/deleteroleresponsebody.md
- docs/models/errbadrequest.md
- docs/models/errbadrequestcode.md
Expand All @@ -100,32 +116,43 @@ generatedFiles:
- docs/models/errunauthorizedcode.md
- docs/models/errunauthorizederror.md
- docs/models/getapirequest.md
- docs/models/getapiresponse.md
- docs/models/getapiresponsebody.md
- docs/models/getidentityratelimits.md
- docs/models/getidentityrequest.md
- docs/models/getidentityresponse.md
- docs/models/getidentityresponsebody.md
- docs/models/getkeyrequest.md
- docs/models/getkeyresponse.md
- docs/models/getpermissionrequest.md
- docs/models/getpermissionresponse.md
- docs/models/getpermissionresponsebody.md
- docs/models/getrolerequest.md
- docs/models/getroleresponse.md
- docs/models/getroleresponsebody.md
- docs/models/getverificationsrequest.md
- docs/models/getverificationsresponse.md
- docs/models/getverificationsresponsebody.md
- docs/models/granularity.md
- docs/models/hash.md
- docs/models/httpmetadata.md
- docs/models/identity.md
- docs/models/interval.md
- docs/models/key.md
- docs/models/limitrequestbody.md
- docs/models/limitresponse.md
- docs/models/limitresponsebody.md
- docs/models/listidentitiesidentities.md
- docs/models/listidentitiesratelimits.md
- docs/models/listidentitiesrequest.md
- docs/models/listidentitiesresponse.md
- docs/models/listidentitiesresponsebody.md
- docs/models/listkeysrequest.md
- docs/models/listkeysresponse.md
- docs/models/listkeysresponsebody.md
- docs/models/listpermissionsresponse.md
- docs/models/listpermissionsresponsebody.md
- docs/models/listrolesresponse.md
- docs/models/listrolesresponsebody.md
- docs/models/op.md
- docs/models/or_.md
Expand All @@ -135,8 +162,10 @@ generatedFiles:
- docs/models/refill.md
- docs/models/removepermissionspermissions.md
- docs/models/removepermissionsrequestbody.md
- docs/models/removepermissionsresponse.md
- docs/models/removepermissionsresponsebody.md
- docs/models/removerolesrequestbody.md
- docs/models/removerolesresponse.md
- docs/models/removerolesresponsebody.md
- docs/models/removerolesroles.md
- docs/models/requestbody.md
Expand All @@ -147,34 +176,41 @@ generatedFiles:
- docs/models/services.md
- docs/models/setpermissionspermissions.md
- docs/models/setpermissionsrequestbody.md
- docs/models/setpermissionsresponse.md
- docs/models/setpermissionsresponsebody.md
- docs/models/setrolesrequestbody.md
- docs/models/setrolesresponse.md
- docs/models/setrolesresponsebody.md
- docs/models/setrolesroles.md
- docs/models/type.md
- docs/models/updateidentityidentitiesratelimits.md
- docs/models/updateidentityratelimits.md
- docs/models/updateidentityrequestbody.md
- docs/models/updateidentityresponse.md
- docs/models/updateidentityresponsebody.md
- docs/models/updatekeyinterval.md
- docs/models/updatekeypermissions.md
- docs/models/updatekeyratelimit.md
- docs/models/updatekeyrefill.md
- docs/models/updatekeyrequestbody.md
- docs/models/updatekeyresponse.md
- docs/models/updatekeyresponsebody.md
- docs/models/updatekeytype.md
- docs/models/updateremainingrequestbody.md
- docs/models/updateremainingresponse.md
- docs/models/updateremainingresponsebody.md
- docs/models/utils/retryconfig.md
- docs/models/v1keysverifykeyrequest.md
- docs/models/v1keysverifykeyrequestratelimit.md
- docs/models/v1keysverifykeyresponse.md
- docs/models/v1keysverifykeyresponseidentity.md
- docs/models/v1keysverifykeyresponseratelimit.md
- docs/models/v1livenessresponse.md
- docs/models/v1livenessresponsebody.md
- docs/models/v1migrationscreatekeysinterval.md
- docs/models/v1migrationscreatekeysratelimit.md
- docs/models/v1migrationscreatekeysrefill.md
- docs/models/v1migrationscreatekeysresponse.md
- docs/models/v1migrationscreatekeysresponsebody.md
- docs/models/v1migrationscreatekeystype.md
- docs/models/v1migrationsenqueuekeyshash.md
Expand All @@ -183,13 +219,16 @@ generatedFiles:
- docs/models/v1migrationsenqueuekeysratelimit.md
- docs/models/v1migrationsenqueuekeysrefill.md
- docs/models/v1migrationsenqueuekeysrequestbody.md
- docs/models/v1migrationsenqueuekeysresponse.md
- docs/models/v1migrationsenqueuekeysresponsebody.md
- docs/models/v1migrationsenqueuekeystype.md
- docs/models/v1migrationsenqueuekeysvariant.md
- docs/models/variant.md
- docs/models/verifications.md
- docs/models/verifykeyresponse.md
- docs/models/whoamiidentity.md
- docs/models/whoamirequestbody.md
- docs/models/whoamiresponse.md
- docs/models/whoamiresponsebody.md
- docs/sdks/apis/README.md
- docs/sdks/identities/README.md
Expand Down Expand Up @@ -246,6 +285,7 @@ generatedFiles:
- src/unkey/models/getpermissionop.py
- src/unkey/models/getroleop.py
- src/unkey/models/getverificationsop.py
- src/unkey/models/httpmetadata.py
- src/unkey/models/key.py
- src/unkey/models/limitop.py
- src/unkey/models/listidentitiesop.py
Expand All @@ -267,6 +307,7 @@ generatedFiles:
- src/unkey/models/v1_migrations_enqueuekeysop.py
- src/unkey/models/v1keysverifykeyrequest.py
- src/unkey/models/v1keysverifykeyresponse.py
- src/unkey/models/verifykeyop.py
- src/unkey/models/whoamiop.py
- src/unkey/permissions.py
- src/unkey/py.typed
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
python:
version: 0.1.0
version: 0.1.1
additionalDependencies:
dev: {}
main: {}
Expand Down
14 changes: 9 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ speakeasyVersion: 1.422.1
sources:
Unkey-OAS:
sourceNamespace: unkey-oas
sourceRevisionDigest: sha256:60726211900401b3a94a208556e8c137defed86b1702d3adca7fd6ba39e3bcd9
sourceBlobDigest: sha256:efbf9d023555a6dde92894add8496a0973cb04cae47594a6085e1c21b3fe5dc7
sourceRevisionDigest: sha256:d83811be4fc2592537d18810313c7f7ae2d8749dd3b952924217478426bf353a
sourceBlobDigest: sha256:6af87205b63b788e53a11d7145cd48df3e627187a5a2f694c27e3b2b49b06871
tags:
- latest
- main
targets:
unkey:
source: Unkey-OAS
sourceNamespace: unkey-oas
sourceRevisionDigest: sha256:60726211900401b3a94a208556e8c137defed86b1702d3adca7fd6ba39e3bcd9
sourceBlobDigest: sha256:efbf9d023555a6dde92894add8496a0973cb04cae47594a6085e1c21b3fe5dc7
sourceRevisionDigest: sha256:d83811be4fc2592537d18810313c7f7ae2d8749dd3b952924217478426bf353a
sourceBlobDigest: sha256:6af87205b63b788e53a11d7145cd48df3e627187a5a2f694c27e3b2b49b06871
codeSamplesNamespace: unkey-oas-code-samples
codeSamplesRevisionDigest: sha256:466ac088f43d10aea6cad73ec10acf253a0dfca32490d6ccbbf596a7a2bea255
codeSamplesRevisionDigest: sha256:6f1836c611b2287bca5a0908a09f9cc0c8b8d6011d4327820f07ac462b0bce3a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -29,6 +30,9 @@ workflow:
unkey:
target: python
source: Unkey-OAS
publish:
pypi:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/unkey/unkey/unkey-oas-code-samples
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ The SDK can be installed with either *pip* or *poetry* package managers.
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

```bash
pip install git+<UNSET>.git
pip install unkey
```

### Poetry

*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.

```bash
poetry add git+<UNSET>.git
poetry add unkey
```
<!-- End SDK Installation [installation] -->

Expand Down Expand Up @@ -82,7 +82,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass
```
Expand All @@ -101,7 +101,7 @@ async def main():
bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)
res = await s.liveness.check_async()
if res is not None:
if res.object is not None:
# handle response
pass

Expand Down Expand Up @@ -194,7 +194,7 @@ s = Unkey(

res = s.identities.list(limit=100)

if res is not None:
if res.object is not None:
while True:
# handle items

Expand Down Expand Up @@ -223,7 +223,7 @@ s = Unkey(
res = s.liveness.check(,
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

if res is not None:
if res.object is not None:
# handle response
pass

Expand All @@ -242,7 +242,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass

Expand Down Expand Up @@ -290,7 +290,7 @@ res = None
try:
res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass

Expand Down Expand Up @@ -345,7 +345,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass

Expand All @@ -366,7 +366,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass

Expand Down Expand Up @@ -476,7 +476,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass

Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## 2024-10-28 09:25:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.422.1 (2.438.15) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.1.1] .
### Releases
- [PyPI v0.1.1] https://pypi.org/project/unkey/0.1.1 - .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ s = Unkey(

res = s.liveness.check()

if res is not None:
if res.object is not None:
# handle response
pass
```
Expand All @@ -29,7 +29,7 @@ async def main():
bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)
res = await s.liveness.check_async()
if res is not None:
if res.object is not None:
# handle response
pass

Expand Down
9 changes: 9 additions & 0 deletions docs/models/addpermissionsresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AddPermissionsResponse


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A |
| `response_bodies` | List[[models.ResponseBody](../models/responsebody.md)] | :heavy_minus_sign: | All currently connected permissions |
Loading

0 comments on commit 1465e9a

Please sign in to comment.