Skip to content

Commit 7cef31e

Browse files
chore: remove custom code
1 parent 8e3d6b5 commit 7cef31e

19 files changed

+215
-214
lines changed

.github/workflows/publish-pypi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: |
2929
bash ./bin/publish-pypi
3030
env:
31-
PYPI_TOKEN: ${{ secrets.BEATSFOUNDATION_PYPI_TOKEN || secrets.PYPI_TOKEN }}
31+
PYPI_TOKEN: ${{ secrets.BEATS_FOUNDATION_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
PYPI_TOKEN: ${{ secrets.BEATSFOUNDATION_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21+
PYPI_TOKEN: ${{ secrets.BEATS_FOUNDATION_PYPI_TOKEN || secrets.PYPI_TOKEN }}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Beatsfoundation
189+
Copyright 2025 Beats Foundation
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# AI Creation Engine SDK, by the BEATS AI Foundation
1+
# Beats Foundation Python API library
22

33
[![PyPI version](https://img.shields.io/pypi/v/beats-foundation.svg)](https://pypi.org/project/beats-foundation/)
44

5-
The AI Creation Engine SDK, by the BEATS AI Foundation, provides convenient access to the AI Creation Engine REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields,
5+
The Beats Foundation Python library provides convenient access to the Beats Foundation REST API from any Python 3.8+
6+
application. The library includes type definitions for all request params and response fields,
67
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
78

89
It is generated with [Stainless](https://www.stainlessapi.com/).
@@ -24,9 +25,9 @@ The full API of this library can be found in [api.md](api.md).
2425

2526
```python
2627
import os
27-
from beats_foundation import Beatsfoundation
28+
from beats_foundation import BeatsFoundation
2829

29-
client = Beatsfoundation(
30+
client = BeatsFoundation(
3031
bearer_token=os.environ.get(
3132
"BEATSFOUNDATION_BEARER_TOKEN"
3233
), # This is the default and can be omitted
@@ -45,14 +46,14 @@ so that your Bearer Token is not stored in source control.
4546

4647
## Async usage
4748

48-
Simply import `AsyncBeatsfoundation` instead of `Beatsfoundation` and use `await` with each API call:
49+
Simply import `AsyncBeatsFoundation` instead of `BeatsFoundation` and use `await` with each API call:
4950

5051
```python
5152
import os
5253
import asyncio
53-
from beats_foundation import AsyncBeatsfoundation
54+
from beats_foundation import AsyncBeatsFoundation
5455

55-
client = AsyncBeatsfoundation(
56+
client = AsyncBeatsFoundation(
5657
bearer_token=os.environ.get(
5758
"BEATSFOUNDATION_BEARER_TOKEN"
5859
), # This is the default and can be omitted
@@ -91,9 +92,9 @@ All errors inherit from `beats_foundation.APIError`.
9192

9293
```python
9394
import beats_foundation
94-
from beats_foundation import Beatsfoundation
95+
from beats_foundation import BeatsFoundation
9596

96-
client = Beatsfoundation()
97+
client = BeatsFoundation()
9798

9899
try:
99100
client.songs.retrieve(
@@ -132,10 +133,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
132133
You can use the `max_retries` option to configure or disable retry settings:
133134

134135
```python
135-
from beats_foundation import Beatsfoundation
136+
from beats_foundation import BeatsFoundation
136137

137138
# Configure the default for all requests:
138-
client = Beatsfoundation(
139+
client = BeatsFoundation(
139140
# default is 2
140141
max_retries=0,
141142
)
@@ -152,16 +153,16 @@ By default requests time out after 1 minute. You can configure this with a `time
152153
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
153154

154155
```python
155-
from beats_foundation import Beatsfoundation
156+
from beats_foundation import BeatsFoundation
156157

157158
# Configure the default for all requests:
158-
client = Beatsfoundation(
159+
client = BeatsFoundation(
159160
# 20 seconds (default is 1 minute)
160161
timeout=20.0,
161162
)
162163

163164
# More granular control:
164-
client = Beatsfoundation(
165+
client = BeatsFoundation(
165166
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
166167
)
167168

@@ -181,10 +182,10 @@ Note that requests that time out are [retried twice by default](#retries).
181182

182183
We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
183184

184-
You can enable logging by setting the environment variable `BEATSFOUNDATION_LOG` to `info`.
185+
You can enable logging by setting the environment variable `BEATS_FOUNDATION_LOG` to `info`.
185186

186187
```shell
187-
$ export BEATSFOUNDATION_LOG=info
188+
$ export BEATS_FOUNDATION_LOG=info
188189
```
189190

190191
Or to `debug` for more verbose logging.
@@ -206,9 +207,9 @@ if response.my_field is None:
206207
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
207208

208209
```py
209-
from beats_foundation import Beatsfoundation
210+
from beats_foundation import BeatsFoundation
210211

211-
client = Beatsfoundation()
212+
client = BeatsFoundation()
212213
response = client.songs.with_raw_response.retrieve(
213214
"REPLACE_ME",
214215
)
@@ -284,10 +285,10 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
284285

285286
```python
286287
import httpx
287-
from beats_foundation import Beatsfoundation, DefaultHttpxClient
288+
from beats_foundation import BeatsFoundation, DefaultHttpxClient
288289

289-
client = Beatsfoundation(
290-
# Or use the `BEATSFOUNDATION_BASE_URL` env var
290+
client = BeatsFoundation(
291+
# Or use the `BEATS_FOUNDATION_BASE_URL` env var
291292
base_url="http://my.test.server.example.com:8083",
292293
http_client=DefaultHttpxClient(
293294
proxy="http://my.test.proxy.example.com",
@@ -307,9 +308,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
307308
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
308309

309310
```py
310-
from beats_foundation import Beatsfoundation
311+
from beats_foundation import BeatsFoundation
311312

312-
with Beatsfoundation() as client:
313+
with BeatsFoundation() as client:
313314
# make requests here
314315
...
315316

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Beatsfoundation please follow the respective company's security reporting guidelines.
19+
or products provided by Beats Foundation please follow the respective company's security reporting guidelines.
2020

21-
### Beatsfoundation Terms and Policies
21+
### Beats Foundation Terms and Policies
2222

2323
Please contact dev-feedback@beatsfoundation.com for any questions or concerns regarding security of our services.
2424

bin/check-release-environment

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
errors=()
44

55
if [ -z "${PYPI_TOKEN}" ]; then
6-
errors+=("The BEATSFOUNDATION_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
6+
errors+=("The BEATS_FOUNDATION_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
77
fi
88

99
lenErrors=${#errors[@]}

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "beats-foundation"
33
version = "0.0.1-alpha.1"
4-
description = "The official Python library for the beatsfoundation API"
4+
description = "The official Python library for the beats-foundation API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Beatsfoundation", email = "dev-feedback@beatsfoundation.com" },
8+
{ name = "Beats Foundation", email = "dev-feedback@beatsfoundation.com" },
99
]
1010
dependencies = [
1111
"httpx>=0.23.0, <1",

src/beats_foundation/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
AsyncClient,
1212
AsyncStream,
1313
RequestOptions,
14-
Beatsfoundation,
15-
AsyncBeatsfoundation,
14+
BeatsFoundation,
15+
AsyncBeatsFoundation,
1616
)
1717
from ._models import BaseModel
1818
from ._version import __title__, __version__
@@ -29,7 +29,7 @@
2929
APIConnectionError,
3030
AuthenticationError,
3131
InternalServerError,
32-
BeatsfoundationError,
32+
BeatsFoundationError,
3333
PermissionDeniedError,
3434
UnprocessableEntityError,
3535
APIResponseValidationError,
@@ -47,7 +47,7 @@
4747
"NotGiven",
4848
"NOT_GIVEN",
4949
"Omit",
50-
"BeatsfoundationError",
50+
"BeatsFoundationError",
5151
"APIError",
5252
"APIStatusError",
5353
"APITimeoutError",
@@ -67,8 +67,8 @@
6767
"AsyncClient",
6868
"Stream",
6969
"AsyncStream",
70-
"Beatsfoundation",
71-
"AsyncBeatsfoundation",
70+
"BeatsFoundation",
71+
"AsyncBeatsFoundation",
7272
"file_from_path",
7373
"BaseModel",
7474
"DEFAULT_TIMEOUT",

src/beats_foundation/_client.py

+29-29
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from ._version import __version__
2727
from .resources import songs
2828
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
29-
from ._exceptions import APIStatusError, BeatsfoundationError
29+
from ._exceptions import APIStatusError, BeatsFoundationError
3030
from ._base_client import (
3131
DEFAULT_MAX_RETRIES,
3232
SyncAPIClient,
@@ -38,17 +38,17 @@
3838
"Transport",
3939
"ProxiesTypes",
4040
"RequestOptions",
41-
"Beatsfoundation",
42-
"AsyncBeatsfoundation",
41+
"BeatsFoundation",
42+
"AsyncBeatsFoundation",
4343
"Client",
4444
"AsyncClient",
4545
]
4646

4747

48-
class Beatsfoundation(SyncAPIClient):
48+
class BeatsFoundation(SyncAPIClient):
4949
songs: songs.SongsResource
50-
with_raw_response: BeatsfoundationWithRawResponse
51-
with_streaming_response: BeatsfoundationWithStreamedResponse
50+
with_raw_response: BeatsFoundationWithRawResponse
51+
with_streaming_response: BeatsFoundationWithStreamedResponse
5252

5353
# client options
5454
bearer_token: str
@@ -76,20 +76,20 @@ def __init__(
7676
# part of our public interface in the future.
7777
_strict_response_validation: bool = False,
7878
) -> None:
79-
"""Construct a new synchronous beatsfoundation client instance.
79+
"""Construct a new synchronous beats-foundation client instance.
8080
8181
This automatically infers the `bearer_token` argument from the `BEATSFOUNDATION_BEARER_TOKEN` environment variable if it is not provided.
8282
"""
8383
if bearer_token is None:
8484
bearer_token = os.environ.get("BEATSFOUNDATION_BEARER_TOKEN")
8585
if bearer_token is None:
86-
raise BeatsfoundationError(
86+
raise BeatsFoundationError(
8787
"The bearer_token client option must be set either by passing bearer_token to the client or by setting the BEATSFOUNDATION_BEARER_TOKEN environment variable"
8888
)
8989
self.bearer_token = bearer_token
9090

9191
if base_url is None:
92-
base_url = os.environ.get("BEATSFOUNDATION_BASE_URL")
92+
base_url = os.environ.get("BEATS_FOUNDATION_BASE_URL")
9393
if base_url is None:
9494
base_url = f"https://www.beatsfoundation.com"
9595

@@ -105,8 +105,8 @@ def __init__(
105105
)
106106

107107
self.songs = songs.SongsResource(self)
108-
self.with_raw_response = BeatsfoundationWithRawResponse(self)
109-
self.with_streaming_response = BeatsfoundationWithStreamedResponse(self)
108+
self.with_raw_response = BeatsFoundationWithRawResponse(self)
109+
self.with_streaming_response = BeatsFoundationWithStreamedResponse(self)
110110

111111
@property
112112
@override
@@ -213,10 +213,10 @@ def _make_status_error(
213213
return APIStatusError(err_msg, response=response, body=body)
214214

215215

216-
class AsyncBeatsfoundation(AsyncAPIClient):
216+
class AsyncBeatsFoundation(AsyncAPIClient):
217217
songs: songs.AsyncSongsResource
218-
with_raw_response: AsyncBeatsfoundationWithRawResponse
219-
with_streaming_response: AsyncBeatsfoundationWithStreamedResponse
218+
with_raw_response: AsyncBeatsFoundationWithRawResponse
219+
with_streaming_response: AsyncBeatsFoundationWithStreamedResponse
220220

221221
# client options
222222
bearer_token: str
@@ -244,20 +244,20 @@ def __init__(
244244
# part of our public interface in the future.
245245
_strict_response_validation: bool = False,
246246
) -> None:
247-
"""Construct a new async beatsfoundation client instance.
247+
"""Construct a new async beats-foundation client instance.
248248
249249
This automatically infers the `bearer_token` argument from the `BEATSFOUNDATION_BEARER_TOKEN` environment variable if it is not provided.
250250
"""
251251
if bearer_token is None:
252252
bearer_token = os.environ.get("BEATSFOUNDATION_BEARER_TOKEN")
253253
if bearer_token is None:
254-
raise BeatsfoundationError(
254+
raise BeatsFoundationError(
255255
"The bearer_token client option must be set either by passing bearer_token to the client or by setting the BEATSFOUNDATION_BEARER_TOKEN environment variable"
256256
)
257257
self.bearer_token = bearer_token
258258

259259
if base_url is None:
260-
base_url = os.environ.get("BEATSFOUNDATION_BASE_URL")
260+
base_url = os.environ.get("BEATS_FOUNDATION_BASE_URL")
261261
if base_url is None:
262262
base_url = f"https://www.beatsfoundation.com"
263263

@@ -273,8 +273,8 @@ def __init__(
273273
)
274274

275275
self.songs = songs.AsyncSongsResource(self)
276-
self.with_raw_response = AsyncBeatsfoundationWithRawResponse(self)
277-
self.with_streaming_response = AsyncBeatsfoundationWithStreamedResponse(self)
276+
self.with_raw_response = AsyncBeatsFoundationWithRawResponse(self)
277+
self.with_streaming_response = AsyncBeatsFoundationWithStreamedResponse(self)
278278

279279
@property
280280
@override
@@ -381,26 +381,26 @@ def _make_status_error(
381381
return APIStatusError(err_msg, response=response, body=body)
382382

383383

384-
class BeatsfoundationWithRawResponse:
385-
def __init__(self, client: Beatsfoundation) -> None:
384+
class BeatsFoundationWithRawResponse:
385+
def __init__(self, client: BeatsFoundation) -> None:
386386
self.songs = songs.SongsResourceWithRawResponse(client.songs)
387387

388388

389-
class AsyncBeatsfoundationWithRawResponse:
390-
def __init__(self, client: AsyncBeatsfoundation) -> None:
389+
class AsyncBeatsFoundationWithRawResponse:
390+
def __init__(self, client: AsyncBeatsFoundation) -> None:
391391
self.songs = songs.AsyncSongsResourceWithRawResponse(client.songs)
392392

393393

394-
class BeatsfoundationWithStreamedResponse:
395-
def __init__(self, client: Beatsfoundation) -> None:
394+
class BeatsFoundationWithStreamedResponse:
395+
def __init__(self, client: BeatsFoundation) -> None:
396396
self.songs = songs.SongsResourceWithStreamingResponse(client.songs)
397397

398398

399-
class AsyncBeatsfoundationWithStreamedResponse:
400-
def __init__(self, client: AsyncBeatsfoundation) -> None:
399+
class AsyncBeatsFoundationWithStreamedResponse:
400+
def __init__(self, client: AsyncBeatsFoundation) -> None:
401401
self.songs = songs.AsyncSongsResourceWithStreamingResponse(client.songs)
402402

403403

404-
Client = Beatsfoundation
404+
Client = BeatsFoundation
405405

406-
AsyncClient = AsyncBeatsfoundation
406+
AsyncClient = AsyncBeatsFoundation

0 commit comments

Comments
 (0)