Skip to content

Commit 90e54ab

Browse files
committed
removes warning not to use library
1 parent ec98213 commit 90e54ab

File tree

1 file changed

+51
-59
lines changed

1 file changed

+51
-59
lines changed

gusto_embedded/README.md

Lines changed: 51 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *gust
1010
</div>
1111

1212

13-
<br /><br />
14-
> [!IMPORTANT]
15-
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/gusto/ruby-sdk). Delete this section before > publishing to a package manager.
16-
1713
<!-- Start Summary [summary] -->
1814
## Summary
1915

@@ -45,10 +41,6 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation!
4541
<!-- Start SDK Installation [installation] -->
4642
## SDK Installation
4743

48-
> [!TIP]
49-
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
50-
51-
5244
> [!NOTE]
5345
> **Python version upgrade policy**
5446
>
@@ -61,23 +53,23 @@ The SDK can be installed with either *pip* or *poetry* package managers.
6153
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
6254

6355
```bash
64-
pip install git+https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_embedded
56+
pip install gusto_embedded
6557
```
6658

6759
### Poetry
6860

6961
*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.
7062

7163
```bash
72-
poetry add git+https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_embedded
64+
poetry add gusto_embedded
7365
```
7466

7567
### Shell and script usage with `uv`
7668

7769
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
7870

7971
```shell
80-
uvx --from gusto python
72+
uvx --from gusto_embedded python
8173
```
8274

8375
It's also possible to write a standalone Python script without needing to set up a whole project like so:
@@ -87,11 +79,11 @@ It's also possible to write a standalone Python script without needing to set up
8779
# /// script
8880
# requires-python = ">=3.9"
8981
# dependencies = [
90-
# "gusto",
82+
# "gusto_embedded",
9183
# ]
9284
# ///
9385

94-
from gusto import Gusto
86+
from gusto_embedded import Gusto
9587

9688
sdk = Gusto(
9789
# SDK arguments
@@ -121,14 +113,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
121113

122114
```python
123115
# Synchronous Example
124-
from gusto import Gusto
116+
from gusto_embedded import Gusto
125117
import os
126118

127119
with Gusto(
128120
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
129-
) as g_client:
121+
) as gusto:
130122

131-
res = g_client.introspection.get_v1_token_info()
123+
res = gusto.introspection.get_v1_token_info()
132124

133125
# Handle response
134126
print(res)
@@ -140,15 +132,15 @@ The same SDK client can also be used to make asychronous requests by importing a
140132
```python
141133
# Asynchronous Example
142134
import asyncio
143-
from gusto import Gusto
135+
from gusto_embedded import Gusto
144136
import os
145137

146138
async def main():
147139
async with Gusto(
148140
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
149-
) as g_client:
141+
) as gusto:
150142

151-
res = await g_client.introspection.get_v1_token_info_async()
143+
res = await gusto.introspection.get_v1_token_info_async()
152144

153145
# Handle response
154146
print(res)
@@ -170,14 +162,14 @@ This SDK supports the following security scheme globally:
170162

171163
To authenticate with the API the `company_access_auth` parameter must be set when initializing the SDK client instance. For example:
172164
```python
173-
from gusto import Gusto
165+
from gusto_embedded import Gusto
174166
import os
175167

176168
with Gusto(
177169
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
178-
) as g_client:
170+
) as gusto:
179171

180-
res = g_client.introspection.get_v1_token_info()
172+
res = gusto.introspection.get_v1_token_info()
181173

182174
# Handle response
183175
print(res)
@@ -188,13 +180,13 @@ with Gusto(
188180

189181
Some operations in this SDK require the security scheme to be specified at the request level. For example:
190182
```python
191-
import gusto
192-
from gusto import Gusto
183+
import gusto_embedded
184+
from gusto_embedded import Gusto
193185
import os
194186

195-
with Gusto() as g_client:
187+
with Gusto() as gusto:
196188

197-
res = g_client.companies.post_v1_partner_managed_companies(security=gusto.PostV1PartnerManagedCompaniesSecurity(
189+
res = gusto.companies.post_v1_partner_managed_companies(security=gusto_embedded.PostV1PartnerManagedCompaniesSecurity(
198190
system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""),
199191
), user={
200192
"first_name": "Frank",
@@ -672,18 +664,18 @@ Certain SDK methods accept file objects as part of a request body or multi-part
672664
>
673665
674666
```python
675-
import gusto
676-
from gusto import Gusto
667+
import gusto_embedded
668+
from gusto_embedded import Gusto
677669
import os
678670

679671
with Gusto(
680672
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
681-
) as g_client:
673+
) as gusto:
682674

683-
res = g_client.company_attachment.post_v1_companies_attachment(company_id="<id>", document={
675+
res = gusto.company_attachment.post_v1_companies_attachment(company_id="<id>", document={
684676
"file_name": "example.file",
685677
"content": open("example.file", "rb"),
686-
}, category=gusto.PostV1CompaniesAttachmentCategory.GEP_NOTICE)
678+
}, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE)
687679

688680
# Handle response
689681
print(res)
@@ -698,15 +690,15 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
698690

699691
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
700692
```python
701-
from gusto import Gusto
702-
from gusto.utils import BackoffStrategy, RetryConfig
693+
from gusto_embedded import Gusto
694+
from gusto_embedded.utils import BackoffStrategy, RetryConfig
703695
import os
704696

705697
with Gusto(
706698
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
707-
) as g_client:
699+
) as gusto:
708700

709-
res = g_client.introspection.get_v1_token_info(,
701+
res = gusto.introspection.get_v1_token_info(,
710702
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
711703

712704
# Handle response
@@ -716,16 +708,16 @@ with Gusto(
716708

717709
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
718710
```python
719-
from gusto import Gusto
720-
from gusto.utils import BackoffStrategy, RetryConfig
711+
from gusto_embedded import Gusto
712+
from gusto_embedded.utils import BackoffStrategy, RetryConfig
721713
import os
722714

723715
with Gusto(
724716
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
725717
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
726-
) as g_client:
718+
) as gusto:
727719

728-
res = g_client.introspection.get_v1_token_info()
720+
res = gusto.introspection.get_v1_token_info()
729721

730722
# Handle response
731723
print(res)
@@ -757,15 +749,15 @@ When custom error responses are specified for an operation, the SDK may also rai
757749
### Example
758750

759751
```python
760-
import gusto
761-
from gusto import Gusto, models
752+
import gusto_embedded
753+
from gusto_embedded import Gusto, models
762754
import os
763755

764-
with Gusto() as g_client:
756+
with Gusto() as gusto:
765757
res = None
766758
try:
767759

768-
res = g_client.companies.post_v1_partner_managed_companies(security=gusto.PostV1PartnerManagedCompaniesSecurity(
760+
res = gusto.companies.post_v1_partner_managed_companies(security=gusto_embedded.PostV1PartnerManagedCompaniesSecurity(
769761
system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""),
770762
), user={
771763
"first_name": "Frank",
@@ -806,15 +798,15 @@ You can override the default server globally by passing a server name to the `se
806798
#### Example
807799

808800
```python
809-
from gusto import Gusto
801+
from gusto_embedded import Gusto
810802
import os
811803

812804
with Gusto(
813805
server="prod",
814806
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
815-
) as g_client:
807+
) as gusto:
816808

817-
res = g_client.introspection.get_v1_token_info()
809+
res = gusto.introspection.get_v1_token_info()
818810

819811
# Handle response
820812
print(res)
@@ -825,15 +817,15 @@ with Gusto(
825817

826818
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
827819
```python
828-
from gusto import Gusto
820+
from gusto_embedded import Gusto
829821
import os
830822

831823
with Gusto(
832824
server_url="https://api.gusto-demo.com",
833825
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
834-
) as g_client:
826+
) as gusto:
835827

836-
res = g_client.introspection.get_v1_token_info()
828+
res = gusto.introspection.get_v1_token_info()
837829

838830
# Handle response
839831
print(res)
@@ -850,7 +842,7 @@ This allows you to wrap the client with your own custom logic, such as adding cu
850842

851843
For example, you could specify a header for every request that this sdk makes as follows:
852844
```python
853-
from gusto import Gusto
845+
from gusto_embedded import Gusto
854846
import httpx
855847

856848
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
@@ -859,8 +851,8 @@ s = Gusto(client=http_client)
859851

860852
or you could wrap the client with your own custom logic:
861853
```python
862-
from gusto import Gusto
863-
from gusto.httpclient import AsyncHttpClient
854+
from gusto_embedded import Gusto
855+
from gusto_embedded.httpclient import AsyncHttpClient
864856
import httpx
865857

866858
class CustomClient(AsyncHttpClient):
@@ -930,20 +922,20 @@ The `Gusto` class implements the context manager protocol and registers a finali
930922
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
931923

932924
```python
933-
from gusto import Gusto
925+
from gusto_embedded import Gusto
934926
import os
935927
def main():
936928
with Gusto(
937929
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
938-
) as g_client:
930+
) as gusto:
939931
# Rest of application here...
940932

941933

942934
# Or when using async:
943935
async def amain():
944936
async with Gusto(
945937
company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""),
946-
) as g_client:
938+
) as gusto:
947939
# Rest of application here...
948940
```
949941
<!-- End Resource Management [resource-management] -->
@@ -955,11 +947,11 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
955947

956948
You can pass your own logger class directly into your SDK.
957949
```python
958-
from gusto import Gusto
950+
from gusto_embedded import Gusto
959951
import logging
960952

961953
logging.basicConfig(level=logging.DEBUG)
962-
s = Gusto(debug_logger=logging.getLogger("gusto"))
954+
s = Gusto(debug_logger=logging.getLogger("gusto_embedded"))
963955
```
964956

965957
You can also enable a default debug logger by setting an environment variable `GUSTO_DEBUG` to true.
@@ -977,7 +969,7 @@ looking for the latest version.
977969

978970
## Contributions
979971

980-
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
981-
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
972+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
973+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
982974

983975
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=gusto&utm_campaign=python)

0 commit comments

Comments
 (0)