# packages

pkgId: d10678918e848a8a78d2b4a053217efa62a4eba8b19096df8067ac85deed957d
name: python-codat-bankfeeds
arch: src
version: 8.0.0
epoch: 0
release: 1
summary: Set up bank feeds from accounts in your application to supported accounting software.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-bankfeeds-8.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Tags Table -->

  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Source accounts | Provide and manage lists of source bank accounts. |
  | Account mapping | Extra functionality for building an account management UI. |
  | Company information | Get detailed information about a company from the underlying platform. |
  | Transactions | Create new bank account transactions for a company's connections, and see previous operations. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->
  <!-- Start Table of Contents [toc] -->

  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [File uploads](https://github.com/codatio/client-sdk-python/blob/master/#file-uploads)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->
  <!-- Start SDK Installation [installation] -->

  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 codat-bankfeeds
  ```

  *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 codat-bankfeeds
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->


  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->
  <!-- Start SDK Example Usage [usage] -->


  ```python

  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  s = CodatBankFeeds(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })
  if res is not None:
      
      pass
  ```
  </br>
  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  async def main():
      s = CodatBankFeeds(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      )
      res = await s.companies.create_async(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })
      if res is not None:
          
          pass
  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->
  <!-- Start Available Resources and Operations [operations] -->

  <details open>
  <summary>Available methods</summary>

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountmapping/README.md#create) - Create bank feed account mapping
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountmapping/README.md#get) - List bank feed accounts

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#create) - Create bank account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#get_create_model) - Get create/update bank account model
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#list) - List bank accounts

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinformation/README.md#get) - Get company information

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#get) - Get configuration
  * [set](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#set) - Set configuration

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create) - Create source account
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#delete) - Delete source account
  * [delete_credentials](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#delete_credentials) - Delete all source account credentials
  * [generate_credentials](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#generate_credentials) - Generate source account credentials
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#list) - List source accounts
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#update) - Update source account

  * [get_last_successful_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_last_successful_sync) - Get last successful sync

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactions/README.md#create) - Create bank transactions
  * [get_create_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactions/README.md#get_create_operation) - Get create operation
  * [list_create_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactions/README.md#list_create_operations) - List create operations
  </details>
  <!-- End Available Resources and Operations [operations] -->
  <!-- Start File uploads [file-upload] -->

  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  s = CodatBankFeeds(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.source_accounts.generate_credentials(request={
      "request_body": open("example.file", "rb"),
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
  })
  if res is not None:
      
      pass
  ```
  <!-- End File uploads [file-upload] -->
  <!-- Start Retries [retries] -->

  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  from codatbankfeeds.utils import BackoffStrategy, RetryConfig
  s = CodatBankFeeds(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  },
      RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
  if res is not None:
      
      pass
  ```
  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:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  from codatbankfeeds.utils import BackoffStrategy, RetryConfig
  s = CodatBankFeeds(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })
  if res is not None:
      
      pass
  ```
  <!-- End Retries [retries] -->
  <!-- Start Error Handling [errors] -->

  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
  By default, an API error will raise a errors.SDKError exception, which has the following properties:
  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |
  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:
  | Error Type                        | Status Code                       | Content Type                      |
  | --------------------------------- | --------------------------------- | --------------------------------- |
  | errors.ErrorMessage               | 400, 401, 402, 403, 429, 500, 503 | application/json                  |
  | errors.SDKError                   | 4XX, 5XX                          | \*/\*                             |

  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import errors, shared
  s = CodatBankFeeds(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = None
  try:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })
      if res is not None:
          
          pass
  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)
  ```
  <!-- End Error Handling [errors] -->
  <!-- Start Server Selection [server] -->


  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |

  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  s = CodatBankFeeds(
      server_idx=0,
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })
  if res is not None:
      
      pass
  ```

  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:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  s = CodatBankFeeds(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })
  if res is not None:
      
      pass
  ```
  <!-- End Server Selection [server] -->
  <!-- Start Custom HTTP Client [http-client] -->

  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  import httpx
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatBankFeeds(client=http_client)
  ```
  or you could wrap the client with your own custom logic:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.httpclient import AsyncHttpClient
  import httpx
  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient
      def __init__(self, client: AsyncHttpClient):
          self.client = client
      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"
          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )
      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )
  s = CodatBankFeeds(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->
  <!-- Start Authentication [security] -->


  This SDK supports the following security scheme globally:
  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_bankfeeds import CodatBankFeeds
  from codat_bankfeeds.models import shared
  s = CodatBankFeeds(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })
  if res is not None:
      
      pass
  ```
  <!-- End Authentication [security] -->
  <!-- Start Debugging [debug] -->

  You can setup your SDK to emit debug logs for SDK requests and responses.
  You can pass your own logger class directly into your SDK.
  ```python
  from codat_bankfeeds import CodatBankFeeds
  import logging
  logging.basicConfig(level=logging.DEBUG)
  s = CodatBankFeeds(debug_logger=logging.getLogger("codat_bankfeeds"))
  ```
  <!-- End Debugging [debug] -->
  <!-- Placeholder for Future Speakeasy SDK Sections -->
  <!-- Start Codat Support Notes -->

  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->
  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 705bdd79f51d4a29b3682e20a7836293c7bffce9865a0ed69395b888846a7e16
name: python-codat-banking
arch: src
version: 0.29.0
epoch: 0
release: 1
summary: Access standardized banking data from our banking integrations.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-banking-0.29.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  ﻿Use Codat's API to connect to your SMB customer's banks and pull up-to-date standardized account and transaction data from their bank accounts via our partner providers.
  <!-- End Codat Library Description -->

  <!-- Start SDK Installation [installation] -->


  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 codat-banking
  ```



  *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 codat-banking
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python

  import codat_banking
  from codat_banking import CodatBanking

  s = CodatBanking(
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  })

  if res is not None:
      
      pass
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  import codat_banking
  from codat_banking import CodatBanking

  async def main():
      s = CodatBanking(
          security=codat_banking.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      )
      res = await s.account_balances.list_async(request={
          "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
          "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
          "order_by": "-modifiedDate",
          "page": 1,
          "page_size": 100,
          "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
      })
      if res is not None:
          
          pass

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountbalancessdk/README.md#list) - List account balances



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountssdk/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountssdk/README.md#list) - List accounts




  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategoriessdk/README.md#get) - Get transaction category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategoriessdk/README.md#list) - List transaction categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionssdk/README.md#get) - Get bank transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionssdk/README.md#list) - List transactions
  * [~~list_bank_transactions~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionssdk/README.md#list_bank_transactions) - List banking transactions :warning: **Deprecated** Use `list` instead.

  </details>
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Summary [summary] -->


  Banking API: Codat's standardized API for accessing banking data.

  > ### New to Codat?
  >
  > Our Banking API reference is relevant only to our existing clients.
  > Please reach out to your Codat contact so that we can find the right product for you.

  Codat's Banking API allows you to access standardised data from over bank accounts via third party providers.

  Standardize how you connect to your customers’ bank accounts. Retrieve bank account and bank transaction data in the same way via our partnerships with Plaid and TrueLayer.

  <!-- Start Codat Tags Table -->


  | Endpoints | Description |
  | :- |:- |
  | Accounts | Where payments are made or received, and bank transactions are recorded. |
  | Account balances | Balances for a bank account including end-of-day batch balance or running balances per transaction. |
  | Transactions | An immutable source of up-to-date information on income and expenditure. |
  | Transaction categories | Hierarchical categories associated with a transaction for greater contextual meaning to transaction activity. |
  <!-- End Codat Tags Table -->

  [Read more...](https://docs.codat.io/banking-api/overview)

  [See our OpenAPI spec](https://github.com/codatio/oas)
  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->


  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  import codat_banking
  from codat_banking import CodatBanking
  from codatbanking.utils import BackoffStrategy, RetryConfig

  s = CodatBanking(
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  },
      RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

  if res is not None:
      
      pass

  ```

  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:
  ```python
  import codat_banking
  from codat_banking import CodatBanking
  from codatbanking.utils import BackoffStrategy, RetryConfig

  s = CodatBanking(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

  | Error Object                        | Status Code                         | Content Type                        |
  | ----------------------------------- | ----------------------------------- | ----------------------------------- |
  | models.ErrorMessage                 | 400,401,402,403,404,409,429,500,503 | application/json                    |
  | models.SDKError                     | 4xx-5xx                             | */*                                 |



  ```python
  import codat_banking
  from codat_banking import CodatBanking, models

  s = CodatBanking(
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = None
  try:
      res = s.account_balances.list(request={
          "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
          "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
          "order_by": "-modifiedDate",
          "page": 1,
          "page_size": 100,
          "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
      })

      if res is not None:
          
          pass

  except models.ErrorMessage as e:
      
      raise(e)
  except models.SDKError as e:
      
      raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |



  ```python
  import codat_banking
  from codat_banking import CodatBanking

  s = CodatBanking(
      server_idx=0,
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  })

  if res is not None:
      
      pass

  ```




  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:
  ```python
  import codat_banking
  from codat_banking import CodatBanking

  s = CodatBanking(
      server_url="https://api.codat.io",
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_banking import CodatBanking
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatBanking(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from codat_banking import CodatBanking
  from codat_banking.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = CodatBanking(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  import codat_banking
  from codat_banking import CodatBanking

  s = CodatBanking(
      security=codat_banking.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.account_balances.list(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      "order_by": "-modifiedDate",
      "page": 1,
      "page_size": 100,
      "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Authentication [security] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from codat_banking import CodatBanking
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = CodatBanking(debug_logger=logging.getLogger("codat_banking"))
  ```
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 982ecfe2248e894fb11d9633f02aa8b30e83df4f151cc814a0ea14a111b77ffd
name: python-codat-lending
arch: src
version: 10.0.0
epoch: 0
release: 1
summary: Make credit decisions backed by enhanced financials, metrics, reports, and data integrity features.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-lending-10.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  Lending helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from the operating systems they are already using. You can use that data for automating decisioning and surfacing new insights on the customer, all via one API.
  <!-- End Codat Library Description -->

  <!-- Start Summary [summary] -->


  Lending API: Our Lending API helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently.

  The Lending API is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers.

  [Explore product](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas)

  <!-- Start Codat Tags Table -->


  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Bank statements | Retrieve banking data from linked bank accounts. |
  | Sales | Retrieve standardized sales data from a linked commerce software. |
  | Financial statements | Financial data and reports from a linked accounting software. |
  | Liabilities | Debt and other liabilities. |
  | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. |
  | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. |
  | Transactions | Data from a linked accounting software representing transactions. |
  | Company info | View company information fetched from the source platform. |
  | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. |
  | Excel reports | Download reports in Excel format. |
  | Manage data | Control how data is retrieved from an integration. |
  | File upload | Endpoints to manage uploaded files. |
  | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->


  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [File uploads](https://github.com/codatio/client-sdk-python/blob/master/#file-uploads)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->

  <!-- Start SDK Installation [installation] -->


  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 codat-lending
  ```



  *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 codat-lending
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python

  from codat_lending import CodatLending
  from codat_lending.models import shared

  with CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_lending import CodatLending
  from codat_lending.models import shared

  async def main():
      async with CodatLending(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      ) as s:
          res = await s.companies.create_async(request={
              "name": "Technicalium",
              "description": "Requested early access to the new financing scheme.",
          })

          if res is not None:
              
              pass

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [list_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccountingbankdata/README.md#list_transactions) - List bank account transactions



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#get) - Get bank account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#list) - List bank accounts






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#get) - Get bill credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#list) - List bill credit notes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#get) - Get bill payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#list) - List bill payments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#download_attachment) - Download bill attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get) - Get bill
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get_attachment) - Get bill attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list) - List bills
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list_attachments) - List bill attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#download_attachment) - Download supplier attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get) - Get supplier
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get_attachment) - Get supplier attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list) - List suppliers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list_attachments) - List supplier attachments






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#get) - Get credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#list) - List credit notes



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#download_attachment) - Download customer attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get) - Get customer
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get_attachment) - Get customer attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list) - List customers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list_attachments) - List customer attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#download_attachment) - Download direct income attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get) - Get direct income
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get_attachment) - Get direct income attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list) - List direct incomes
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list_attachments) - List direct income attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_attachment) - Download invoice attachment
  * [download_pdf](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_pdf) - Get invoice as PDF
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get) - Get invoice
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get_attachment) - Get invoice attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list) - List invoices
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_attachments) - List invoice attachments
  * [list_reconciled](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_reconciled) - List reconciled invoices



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#list) - List payments



  * [get_aged_creditors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_creditors) - Aged creditors report
  * [get_aged_debtors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_debtors) - Aged debtors report
  * [is_aged_creditors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_creditors_available) - Aged creditors report available
  * [is_aged_debtors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_debtors_available) - Aged debtors report available



  * [end_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#end_upload_session) - End upload session
  * [get_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#get_upload_configuration) - Get upload configuration
  * [set_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#set_upload_configuration) - Set upload configuration
  * [start_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#start_upload_session) - Start upload session
  * [upload_bank_statement_data](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#upload_bank_statement_data) - Upload data






  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountbalances/README.md#list) - List account balances



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/categorizedstatement/README.md#get) - Get categorized bank statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#get) - Get transaction category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#list) - List transaction categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#get) - Get bank transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#list) - List transactions




  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company



  * [get_accounting_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_accounting_profile) - Get company accounting profile
  * [get_commerce_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_commerce_profile) - Get company commerce profile



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection



  * [details](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#details) - List data integrity details
  * [status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#status) - Get data integrity status
  * [summaries](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#summaries) - Get data integrity summaries



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#download) - Download Excel report
  * [generate](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#generate) - Generate Excel report
  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#get_status) - Get Excel report status



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#download) - Download all files for a company
  * [list_uploaded](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#list_uploaded) - List all files uploaded by a company
  * [upload](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#upload) - Upload files for a company






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get) - Get balance sheet
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get_categorized_accounts) - Get categorized balance sheet statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/cashflow/README.md#get) - Get cash flow statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get) - Get profit and loss
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get_categorized_accounts) - Get categorized profit and loss statement



  * [generate_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_summary) - Generate loan summaries report
  * [generate_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_transactions) - Generate loan transactions report
  * [get_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#get_loan_summary) - Get loan summaries
  * [list_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#list_loan_transactions) - List loan transactions






  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#create) - Create account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#get_create_model) - Get create account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#create) - Create bank account
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#get_create_update_model) - Get create/update bank account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#create) - Create bank account transactions
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#get_create_model) - Get create bank account transactions model



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#get) - Get create operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#list) - List create operations



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#create) - Create direct cost
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#get_create_model) - Get create direct cost model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#create) - Create payment
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#get_create_model) - Get create payment model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create) - Create source account
  * [create_mapping](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create_mapping) - Create bank feed account mapping



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#create) - Create supplier
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#get_create_update_model) - Get create/update supplier model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#create) - Create transfer
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#get_create_model) - Get create transfer model



  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get_status) - Get data status



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#get) - Get pull operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#list) - List pull operations



  * [all_data_types](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#all_data_types) - Refresh all data
  * [data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#data_type) - Refresh data type



  * [generate_report](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#generate_report) - Generate report
  * [list_reports](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#list_reports) - List reports






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#get) - Get customer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#list) - List customers



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#get) - Get dispute
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#list) - List disputes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#get) - Get location
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#list) - List locations



  * [get_customer_retention](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_customer_retention) - Get customer retention metrics
  * [get_lifetime_value](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_lifetime_value) - Get lifetime value metrics
  * [get_revenue](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_revenue) - Get commerce revenue metrics



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#get) - Get order
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#list) - List orders



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#get) - Get payment method
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#list) - List payment methods



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#list) - List payments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#get) - Get product category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#list) - List product categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#get) - Get product
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#list) - List products



  * [get_orders](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_orders) - Get orders report
  * [get_refunds](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_refunds) - Get refunds report



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#get) - Get transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#list) - List transactions






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#get) - Get account transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#list) - List account transactions



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#download_attachment) - Download direct cost attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get) - Get direct cost
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get_attachment) - Get direct cost attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list) - List direct costs
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list_attachments) - List direct cost attachments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#get) - Get journal entry
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#list) - List journal entries



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#get) - Get journal
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#list) - List journals



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#get) - Get transfer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#list) - List transfers

  </details>
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  with CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      },
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

      if res is not None:
          
          pass

  ```

  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  with CodatLending(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

  By default, an API error will raise a errors.SDKError exception, which has the following properties:

  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |

  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:

  | Error Type          | Status Code                       | Content Type     |
  | ------------------- | --------------------------------- | ---------------- |
  | errors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
  | errors.SDKError     | 4XX, 5XX                          | \*/\*            |



  ```python
  from codat_lending import CodatLending
  from codat_lending.models import errors, shared

  with CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = None
      try:
          res = s.companies.create(request={
              "name": "Technicalium",
              "description": "Requested early access to the new financing scheme.",
          })

          if res is not None:
              
              pass

      except errors.ErrorMessage as e:
          
          raise(e)
      except errors.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  with CodatLending(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_lending import CodatLending
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatLending(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from codat_lending import CodatLending
  from codat_lending.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = CodatLending(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type   | Scheme  |
  | ------------- | ------ | ------- |
  | `auth_header` | apiKey | API key |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  with CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass

  ```
  <!-- End Authentication [security] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start File uploads [file-upload] -->


  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.

  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >

  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  with CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      s.file_upload.upload(request={
          "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
          "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
      })

      

  ```
  <!-- End File uploads [file-upload] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from codat_lending import CodatLending
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = CodatLending(debug_logger=logging.getLogger("codat_lending"))
  ```
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 081a8811abe678f54c9bd1110a812d0a1cc6422474833a211e0166896bf29df2
name: python-codat-lending
arch: src
version: 8.0.0
epoch: 0
release: 1
summary: Make credit decisions backed by enhanced financials, metrics, reports, and data integrity features.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-lending-8.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  Lending helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from the operating systems they are already using. You can use that data for automating decisioning and surfacing new insights on the customer, all via one API.
  <!-- End Codat Library Description -->

  <!-- Start Summary [summary] -->


  Lending API: Our Lending API helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently.

  The Lending API is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers.

  [Explore product](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas)

  <!-- Start Codat Tags Table -->


  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Bank statements | Retrieve banking data from linked bank accounts. |
  | Sales | Retrieve standardized sales data from a linked commerce software. |
  | Financial statements | Financial data and reports from a linked accounting software. |
  | Liabilities | Debt and other liabilities. |
  | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. |
  | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. |
  | Transactions | Data from a linked accounting software representing transactions. |
  | Company info | View company information fetched from the source platform. |
  | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. |
  | Excel reports | Download reports in Excel format. |
  | Manage data | Control how data is retrieved from an integration. |
  | File upload | Endpoints to manage uploaded files. |
  | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->


  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [File uploads](https://github.com/codatio/client-sdk-python/blob/master/#file-uploads)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->

  <!-- Start SDK Installation [installation] -->


  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 codat-lending
  ```



  *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 codat-lending
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python

  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_lending import CodatLending
  from codat_lending.models import shared

  async def main():
      s = CodatLending(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      )
      res = await s.companies.create_async(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })
      if res is not None:
          
          pass

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [list_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccountingbankdata/README.md#list_transactions) - List bank account transactions



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#get) - Get bank account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#list) - List bank accounts






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#get) - Get bill credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#list) - List bill credit notes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#get) - Get bill payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#list) - List bill payments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#download_attachment) - Download bill attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get) - Get bill
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get_attachment) - Get bill attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list) - List bills
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list_attachments) - List bill attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#download_attachment) - Download supplier attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get) - Get supplier
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get_attachment) - Get supplier attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list) - List suppliers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list_attachments) - List supplier attachments






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#get) - Get credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#list) - List credit notes



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#download_attachment) - Download customer attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get) - Get customer
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get_attachment) - Get customer attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list) - List customers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list_attachments) - List customer attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#download_attachment) - Download direct income attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get) - Get direct income
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get_attachment) - Get direct income attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list) - List direct incomes
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list_attachments) - List direct income attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_attachment) - Download invoice attachment
  * [download_pdf](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_pdf) - Get invoice as PDF
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get) - Get invoice
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get_attachment) - Get invoice attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list) - List invoices
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_attachments) - List invoice attachments
  * [list_reconciled](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_reconciled) - List reconciled invoices



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#list) - List payments



  * [get_aged_creditors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_creditors) - Aged creditors report
  * [get_aged_debtors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_debtors) - Aged debtors report
  * [is_aged_creditors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_creditors_available) - Aged creditors report available
  * [is_aged_debtors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_debtors_available) - Aged debtors report available



  * [end_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#end_upload_session) - End upload session
  * [get_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#get_upload_configuration) - Get upload configuration
  * [set_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#set_upload_configuration) - Set upload configuration
  * [start_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#start_upload_session) - Start upload session
  * [upload_bank_statement_data](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#upload_bank_statement_data) - Upload data






  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountbalances/README.md#list) - List account balances



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/categorizedstatement/README.md#get) - Get categorized bank statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#get) - Get transaction category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#list) - List transaction categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#get) - Get bank transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#list) - List transactions




  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company



  * [get_accounting_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_accounting_profile) - Get company accounting profile
  * [get_commerce_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_commerce_profile) - Get company commerce profile



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection



  * [details](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#details) - List data integrity details
  * [status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#status) - Get data integrity status
  * [summaries](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#summaries) - Get data integrity summaries



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#download) - Download Excel report
  * [generate](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#generate) - Generate Excel report
  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#get_status) - Get Excel report status



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#download) - Download all files for a company
  * [list_uploaded](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#list_uploaded) - List all files uploaded by a company
  * [upload](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#upload) - Upload files for a company






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get) - Get balance sheet
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get_categorized_accounts) - Get categorized balance sheet statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/cashflow/README.md#get) - Get cash flow statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get) - Get profit and loss
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get_categorized_accounts) - Get categorized profit and loss statement



  * [generate_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_summary) - Generate loan summaries report
  * [generate_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_transactions) - Generate loan transactions report
  * [get_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#get_loan_summary) - Get loan summaries
  * [list_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#list_loan_transactions) - List loan transactions






  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#create) - Create account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#get_create_model) - Get create account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#create) - Create bank account
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#get_create_update_model) - Get create/update bank account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#create) - Create bank account transactions
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#get_create_model) - Get create bank account transactions model



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#get) - Get create operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#list) - List create operations



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#create) - Create direct cost
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#get_create_model) - Get create direct cost model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#create) - Create payment
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#get_create_model) - Get create payment model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create) - Create source account
  * [create_mapping](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create_mapping) - Create bank feed account mapping



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#create) - Create supplier
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#get_create_update_model) - Get create/update supplier model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#create) - Create transfer
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#get_create_model) - Get create transfer model



  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get_status) - Get data status



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#get) - Get pull operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#list) - List pull operations



  * [all_data_types](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#all_data_types) - Refresh all data
  * [data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#data_type) - Refresh data type



  * [generate_report](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#generate_report) - Generate report
  * [list_reports](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#list_reports) - List reports






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#get) - Get customer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#list) - List customers



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#get) - Get dispute
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#list) - List disputes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#get) - Get location
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#list) - List locations



  * [get_customer_retention](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_customer_retention) - Get customer retention metrics
  * [get_lifetime_value](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_lifetime_value) - Get lifetime value metrics
  * [get_revenue](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_revenue) - Get commerce revenue metrics



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#get) - Get order
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#list) - List orders



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#get) - Get payment method
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#list) - List payment methods



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#list) - List payments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#get) - Get product category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#list) - List product categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#get) - Get product
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#list) - List products



  * [get_orders](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_orders) - Get orders report
  * [get_refunds](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_refunds) - Get refunds report



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#get) - Get transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#list) - List transactions






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#get) - Get account transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#list) - List account transactions



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#download_attachment) - Download direct cost attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get) - Get direct cost
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get_attachment) - Get direct cost attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list) - List direct costs
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list_attachments) - List direct cost attachments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#get) - Get journal entry
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#list) - List journal entries



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#get) - Get journal
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#list) - List journals



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#get) - Get transfer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#list) - List transfers

  </details>
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  },
      RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

  if res is not None:
      
      pass

  ```

  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  s = CodatLending(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

  By default, an API error will raise a errors.SDKError exception, which has the following properties:

  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |

  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:

  | Error Type                        | Status Code                       | Content Type                      |
  | --------------------------------- | --------------------------------- | --------------------------------- |
  | errors.ErrorMessage               | 400, 401, 402, 403, 429, 500, 503 | application/json                  |
  | errors.SDKError                   | 4XX, 5XX                          | \*/\*                             |



  ```python
  from codat_lending import CodatLending
  from codat_lending.models import errors, shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = None
  try:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass

  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |



  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      server_idx=0,
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```




  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_lending import CodatLending
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatLending(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from codat_lending import CodatLending
  from codat_lending.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = CodatLending(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Authentication [security] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start File uploads [file-upload] -->


  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.

  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >

  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  s.file_upload.upload(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
  })



  ```
  <!-- End File uploads [file-upload] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from codat_lending import CodatLending
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = CodatLending(debug_logger=logging.getLogger("codat_lending"))
  ```
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 3f9247dd26e3a389fe378253431c8654c9765fbf6cd491ed71e2514652782fb5
name: python-codat-lending
arch: src
version: 9.0.0
epoch: 0
release: 1
summary: Make credit decisions backed by enhanced financials, metrics, reports, and data integrity features.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-lending-9.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  Lending helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from the operating systems they are already using. You can use that data for automating decisioning and surfacing new insights on the customer, all via one API.
  <!-- End Codat Library Description -->

  <!-- Start Summary [summary] -->


  Lending API: Our Lending API helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from accounting, banking, and commerce software they are already using. It also includes features to help providers verify the accuracy of data and process it more efficiently.

  The Lending API is built on top of the latest accounting, commerce, and banking data, providing you with the most important data points you need to get a full picture of SMB creditworthiness and make a comprehensive assessment of your customers.

  [Explore product](https://docs.codat.io/lending/overview) | [See OpenAPI spec](https://github.com/codatio/oas)

  <!-- Start Codat Tags Table -->


  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Bank statements | Retrieve banking data from linked bank accounts. |
  | Sales | Retrieve standardized sales data from a linked commerce software. |
  | Financial statements | Financial data and reports from a linked accounting software. |
  | Liabilities | Debt and other liabilities. |
  | Accounts payable | Data from a linked accounting software representing money the business owes money to its suppliers. |
  | Accounts receivable | Data from a linked accounting software representing money owed to the business for sold goods or services. |
  | Transactions | Data from a linked accounting software representing transactions. |
  | Company info | View company information fetched from the source platform. |
  | Data integrity | Match mutable accounting data with immutable banking data to increase confidence in financial data. |
  | Excel reports | Download reports in Excel format. |
  | Manage data | Control how data is retrieved from an integration. |
  | File upload | Endpoints to manage uploaded files. |
  | Loan writeback | Implement the [loan writeback](https://docs.codat.io/lending/guides/loan-writeback/introduction) procedure in your lending process to maintain an accurate position of a loan during the entire lending cycle. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->

  <!-- Start Table of Contents [toc] -->


  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [File uploads](https://github.com/codatio/client-sdk-python/blob/master/#file-uploads)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->

  <!-- Start SDK Installation [installation] -->


  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 codat-lending
  ```



  *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 codat-lending
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python

  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass
  ```

  </br>

  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_lending import CodatLending
  from codat_lending.models import shared

  async def main():
      s = CodatLending(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      )
      res = await s.companies.create_async(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })
      if res is not None:
          
          pass

  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->


  <details open>
  <summary>Available methods</summary>



  * [list_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccountingbankdata/README.md#list_transactions) - List bank account transactions



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#get) - Get bank account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#list) - List bank accounts






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#get) - Get bill credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billcreditnotes/README.md#list) - List bill credit notes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#get) - Get bill payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/billpayments/README.md#list) - List bill payments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#download_attachment) - Download bill attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get) - Get bill
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#get_attachment) - Get bill attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list) - List bills
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bills/README.md#list_attachments) - List bill attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#download_attachment) - Download supplier attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get) - Get supplier
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get_attachment) - Get supplier attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list) - List suppliers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list_attachments) - List supplier attachments






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#get) - Get credit note
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/creditnotes/README.md#list) - List credit notes



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#download_attachment) - Download customer attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get) - Get customer
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get_attachment) - Get customer attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list) - List customers
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list_attachments) - List customer attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#download_attachment) - Download direct income attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get) - Get direct income
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#get_attachment) - Get direct income attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list) - List direct incomes
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directincomes/README.md#list_attachments) - List direct income attachments



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_attachment) - Download invoice attachment
  * [download_pdf](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#download_pdf) - Get invoice as PDF
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get) - Get invoice
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#get_attachment) - Get invoice attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list) - List invoices
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_attachments) - List invoice attachments
  * [list_reconciled](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/invoices/README.md#list_reconciled) - List reconciled invoices



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/payments/README.md#list) - List payments



  * [get_aged_creditors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_creditors) - Aged creditors report
  * [get_aged_debtors](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#get_aged_debtors) - Aged debtors report
  * [is_aged_creditors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_creditors_available) - Aged creditors report available
  * [is_aged_debtors_available](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reports/README.md#is_aged_debtors_available) - Aged debtors report available



  * [end_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#end_upload_session) - End upload session
  * [get_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#get_upload_configuration) - Get upload configuration
  * [set_upload_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#set_upload_configuration) - Set upload configuration
  * [start_upload_session](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#start_upload_session) - Start upload session
  * [upload_bank_statement_data](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankstatements/README.md#upload_bank_statement_data) - Upload data






  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accountbalances/README.md#list) - List account balances



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/categorizedstatement/README.md#get) - Get categorized bank statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#get) - Get transaction category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactioncategories/README.md#list) - List transaction categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#get) - Get bank transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingbankingtransactions/README.md#list) - List transactions




  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company



  * [get_accounting_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_accounting_profile) - Get company accounting profile
  * [get_commerce_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get_commerce_profile) - Get company commerce profile



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection



  * [details](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#details) - List data integrity details
  * [status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#status) - Get data integrity status
  * [summaries](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/dataintegrity/README.md#summaries) - Get data integrity summaries



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#download) - Download Excel report
  * [generate](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#generate) - Generate Excel report
  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/excelreports/README.md#get_status) - Get Excel report status



  * [download](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#download) - Download all files for a company
  * [list_uploaded](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#list_uploaded) - List all files uploaded by a company
  * [upload](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/fileupload/README.md#upload) - Upload files for a company






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#get) - Get account
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingfinancialstatementsaccounts/README.md#list) - List accounts



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get) - Get balance sheet
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/balancesheet/README.md#get_categorized_accounts) - Get categorized balance sheet statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/cashflow/README.md#get) - Get cash flow statement



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get) - Get profit and loss
  * [get_categorized_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/profitandloss/README.md#get_categorized_accounts) - Get categorized profit and loss statement



  * [generate_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_summary) - Generate loan summaries report
  * [generate_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#generate_loan_transactions) - Generate loan transactions report
  * [get_loan_summary](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#get_loan_summary) - Get loan summaries
  * [list_loan_transactions](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/liabilities/README.md#list_loan_transactions) - List loan transactions






  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#create) - Create account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingloanwritebackaccounts/README.md#get_create_model) - Get create account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#create) - Create bank account
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#get_create_update_model) - Get create/update bank account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#create) - Create bank account transactions
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/banktransactions/README.md#get_create_model) - Get create bank account transactions model



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#get) - Get create operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/createoperations/README.md#list) - List create operations



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#create) - Create direct cost
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/directcosts/README.md#get_create_model) - Get create direct cost model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#create) - Create payment
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingpayments/README.md#get_create_model) - Get create payment model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create) - Create source account
  * [create_mapping](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sourceaccounts/README.md#create_mapping) - Create bank feed account mapping



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#create) - Create supplier
  * [get_create_update_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsuppliers/README.md#get_create_update_model) - Get create/update supplier model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#create) - Create transfer
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#get_create_model) - Get create transfer model



  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get_status) - Get data status



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#get) - Get pull operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pulloperations/README.md#list) - List pull operations



  * [all_data_types](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#all_data_types) - Refresh all data
  * [data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refresh/README.md#data_type) - Refresh data type



  * [generate_report](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#generate_report) - Generate report
  * [list_reports](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managereports/README.md#list_reports) - List reports






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#get) - Get customer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingcustomers/README.md#list) - List customers



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#get) - Get dispute
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/disputes/README.md#list) - List disputes



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#get) - Get location
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/locations/README.md#list) - List locations



  * [get_customer_retention](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_customer_retention) - Get customer retention metrics
  * [get_lifetime_value](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_lifetime_value) - Get lifetime value metrics
  * [get_revenue](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/metrics/README.md#get_revenue) - Get commerce revenue metrics



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#get) - Get order
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/orders/README.md#list) - List orders



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#get) - Get payment method
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/paymentmethods/README.md#list) - List payment methods



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#get) - Get payment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingsalespayments/README.md#list) - List payments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#get) - Get product category
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/productcategories/README.md#list) - List product categories



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#get) - Get product
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/products/README.md#list) - List products



  * [get_orders](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_orders) - Get orders report
  * [get_refunds](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingreports/README.md#get_refunds) - Get refunds report



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#get) - Get transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransactions/README.md#list) - List transactions






  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#get) - Get account transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounttransactions/README.md#list) - List account transactions



  * [download_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#download_attachment) - Download direct cost attachment
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get) - Get direct cost
  * [get_attachment](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#get_attachment) - Get direct cost attachment
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list) - List direct costs
  * [list_attachments](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingdirectcosts/README.md#list_attachments) - List direct cost attachments



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#get) - Get journal entry
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journalentries/README.md#list) - List journal entries



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#get) - Get journal
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/journals/README.md#list) - List journals



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#get) - Get transfer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/codatlendingtransfers/README.md#list) - List transfers

  </details>
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  },
      RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

  if res is not None:
      
      pass

  ```

  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared
  from codatlending.utils import BackoffStrategy, RetryConfig

  s = CodatLending(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

  By default, an API error will raise a errors.SDKError exception, which has the following properties:

  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |

  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:

  | Error Type          | Status Code                       | Content Type     |
  | ------------------- | --------------------------------- | ---------------- |
  | errors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
  | errors.SDKError     | 4XX, 5XX                          | \*/\*            |



  ```python
  from codat_lending import CodatLending
  from codat_lending.models import errors, shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = None
  try:
      res = s.companies.create(request={
          "name": "Technicalium",
          "description": "Requested early access to the new financing scheme.",
      })

      if res is not None:
          
          pass

  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)
  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  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:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_lending import CodatLending
  import httpx

  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatLending(client=http_client)
  ```

  or you could wrap the client with your own custom logic:
  ```python
  from codat_lending import CodatLending
  from codat_lending.httpclient import AsyncHttpClient
  import httpx

  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient

      def __init__(self, client: AsyncHttpClient):
          self.client = client

      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"

          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )

      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )

  s = CodatLending(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type   | Scheme  |
  | ------------- | ------ | ------- |
  | `auth_header` | apiKey | API key |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  res = s.companies.create(request={
      "name": "Technicalium",
      "description": "Requested early access to the new financing scheme.",
  })

  if res is not None:
      
      pass

  ```
  <!-- End Authentication [security] -->

  <!-- Start IDE Support [idesupport] -->




  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.

  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->

  <!-- Start File uploads [file-upload] -->


  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.

  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >

  ```python
  from codat_lending import CodatLending
  from codat_lending.models import shared

  s = CodatLending(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  s.file_upload.upload(request={
      "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
      "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
  })



  ```
  <!-- End File uploads [file-upload] -->

  <!-- Start Debugging [debug] -->


  You can setup your SDK to emit debug logs for SDK requests and responses.

  You can pass your own logger class directly into your SDK.
  ```python
  from codat_lending import CodatLending
  import logging

  logging.basicConfig(level=logging.DEBUG)
  s = CodatLending(debug_logger=logging.getLogger("codat_lending"))
  ```
  <!-- End Debugging [debug] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: be21e9b7d6040fbf250b9c5e3709b8141e22ec80fb9b306506b1b66d64b27458
name: python-codat-platform
arch: src
version: 3.5.0
epoch: 0
release: 1
summary: Manage the building blocks of Codat, including companies, connections, and more.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-platform-3.5.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  Manage the building blocks of Codat, including companies, connections, and more.
  <!-- End Codat Library Description -->

  <!-- Start SDK Installation [installation] -->


  ```bash
  pip install codat-platform
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python
  import codatplatform
  from codatplatform.models import shared

  s = codatplatform.CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req)

  if res.api_key_details is not None:
      
      pass

  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->




  * [create_api_key](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#create_api_key) - Create API key
  * [delete_api_key](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#delete_api_key) - Delete API key
  * [get_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#get_profile) - Get profile
  * [get_sync_settings](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#get_sync_settings) - Get sync settings
  * [list_api_keys](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#list_api_keys) - List API keys
  * [update_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#update_profile) - Update profile
  * [update_sync_settings](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#update_sync_settings) - Update all sync settings



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company



  * [get_access_token](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connectionmanagement/README.md#get_access_token) - Get access token



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/corssettings/README.md#get) - Get CORS settings
  * [set](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/corssettings/README.md#set) - Set CORS settings



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection
  * [update_authorization](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_authorization) - Update authorization



  * [configure](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#configure) - Configure custom data type
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#get_configuration) - Get custom data configuration
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#list) - List custom data type records
  * [refresh](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#refresh) - Refresh custom data type



  * [get_model_options](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#get_model_options) - Get push options
  * [get_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#get_operation) - Get push operation
  * [list_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#list_operations) - List push operations



  * [all](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#all) - Refresh all data
  * [by_data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#by_data_type) - Refresh data type
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#get) - Get data status
  * [get_pull_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#get_pull_operation) - Get pull operation
  * [list_pull_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#list_pull_operations) - List pull operations



  * [add_company](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/groups/README.md#add_company) - Add company
  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/groups/README.md#create) - Create group
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/groups/README.md#list) - List groups
  * [remove_company](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/groups/README.md#remove_company) - Remove company



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get) - Get integration
  * [get_branding](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get_branding) - Get branding
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#list) - List integrations



  * [configure](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/supplementaldata/README.md#configure) - Configure
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/supplementaldata/README.md#get_configuration) - Get configuration



  * [~~create~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#create) - Create webhook :warning: **Deprecated**
  * [create_consumer](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#create_consumer) - Create webhook consumer
  * [delete_consumer](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#delete_consumer) - Delete webhook consumer
  * [~~get~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#get) - Get webhook :warning: **Deprecated**
  * [~~list~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#list) - List webhooks :warning: **Deprecated**
  * [list_consumers](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#list_consumers) - List webhook consumers
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  import codatplatform
  from codatplatform.models import shared
  from codatplatform.utils import BackoffStrategy, RetryConfig

  s = codatplatform.CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req,
      RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))

  if res.api_key_details is not None:
      
      pass

  ```

  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:
  ```python
  import codatplatform
  from codatplatform.models import shared
  from codatplatform.utils import BackoffStrategy, RetryConfig

  s = codatplatform.CodatPlatform(
      retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req)

  if res.api_key_details is not None:
      
      pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

  | Error Object                    | Status Code                     | Content Type                    |
  | ------------------------------- | ------------------------------- | ------------------------------- |
  | errors.ErrorMessage             | 400,401,402,403,409,429,500,503 | application/json                |
  | errors.SDKError                 | 4xx-5xx                         | */*                             |



  ```python
  import codatplatform
  from codatplatform.models import errors, shared

  s = codatplatform.CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = None
  try:
      res = s.settings.create_api_key(req)
  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)

  if res.api_key_details is not None:
      
      pass

  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |



  ```python
  import codatplatform
  from codatplatform.models import shared

  s = codatplatform.CodatPlatform(
      server_idx=0,
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req)

  if res.api_key_details is not None:
      
      pass

  ```




  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:
  ```python
  import codatplatform
  from codatplatform.models import shared

  s = codatplatform.CodatPlatform(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req)

  if res.api_key_details is not None:
      
      pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  import codatplatform
  import requests

  http_client = requests.Session()
  http_client.headers.update({'x-custom-header': 'someValue'})
  s = codatplatform.CodatPlatform(client=http_client)
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  import codatplatform
  from codatplatform.models import shared

  s = codatplatform.CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CreateAPIKey(
      name='azure-invoice-finance-processor',
  )

  res = s.settings.create_api_key(req)

  if res.api_key_details is not None:
      
      pass

  ```
  <!-- End Authentication [security] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 0c05aed97d497a6a1b9b2eb7a073f03ad1db61cff3c620e145ed7702a120e90c
name: python-codat-platform
arch: src
version: 4.0.0
epoch: 0
release: 1
summary: Manage the building blocks of Codat, including companies, connections, and more.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-platform-4.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Tags Table -->

  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Connection management | Configure connection management UI and retrieve access tokens for authentication. |
  | Webhooks | Create and manage webhooks that listen to Codat's events. |
  | Integrations | Get a list of integrations supported by Codat and their logos. |
  | Refresh data | Initiate data refreshes, view pull status and history. |
  | Settings | Manage company profile configuration, sync settings, and API keys. |
  | Push data | Initiate and monitor Create, Update, and Delete operations. |
  | Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |
  | Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->
  <!-- Start Table of Contents [toc] -->

  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->
  <!-- Start SDK Installation [installation] -->

  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 codat-platform
  ```

  *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 codat-platform
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->


  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->
  <!-- Start SDK Example Usage [usage] -->


  ```python

  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  with CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.settings.create_api_key(request={
          "name": "azure-invoice-finance-processor",
      })
      if res is not None:
          
          pass
  ```
  </br>
  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  async def main():
      async with CodatPlatform(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      ) as s:
          res = await s.settings.create_api_key_async(request={
              "name": "azure-invoice-finance-processor",
          })
          if res is not None:
              
              pass
  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->
  <!-- Start Available Resources and Operations [operations] -->

  <details open>
  <summary>Available methods</summary>

  * [add_product](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#add_product) - Add product
  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [get_access_token](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get_access_token) - Get company access token
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [remove_product](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#remove_product) - Remove product
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company

  * [get_access_token](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connectionmanagement/README.md#get_access_token) - Get access token

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/corssettings/README.md#get) - Get CORS settings
  * [set](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/corssettings/README.md#set) - Set CORS settings

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection
  * [update_authorization](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_authorization) - Update authorization

  * [configure](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#configure) - Configure custom data type
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#get_configuration) - Get custom data configuration
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#list) - List custom data type records
  * [refresh](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customdatatype/README.md#refresh) - Refresh custom data type

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get) - Get integration
  * [get_branding](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get_branding) - Get branding
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#list) - List integrations

  * [get_model_options](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#get_model_options) - Get push options
  * [get_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#get_operation) - Get push operation
  * [list_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushdata/README.md#list_operations) - List push operations

  * [all](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#all) - Refresh all data
  * [by_data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#by_data_type) - Refresh data type
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#get) - Get data status
  * [get_pull_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#get_pull_operation) - Get pull operation
  * [list_pull_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/refreshdata/README.md#list_pull_operations) - List pull operations

  * [create_api_key](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#create_api_key) - Create API key
  * [delete_api_key](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#delete_api_key) - Delete API key
  * [get_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#get_profile) - Get profile
  * [get_sync_settings](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#get_sync_settings) - Get sync settings
  * [list_api_keys](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#list_api_keys) - List API keys
  * [update_profile](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#update_profile) - Update profile
  * [update_sync_settings](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/settings/README.md#update_sync_settings) - Update all sync settings

  * [configure](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/supplementaldata/README.md#configure) - Configure
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/supplementaldata/README.md#get_configuration) - Get configuration

  * [~~create~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#create) - Create webhook (legacy) :warning: **Deprecated**
  * [create_consumer](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#create_consumer) - Create webhook consumer
  * [delete_consumer](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#delete_consumer) - Delete webhook consumer
  * [~~get~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#get) - Get webhook (legacy) :warning: **Deprecated**
  * [~~list~~](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#list) - List webhooks (legacy) :warning: **Deprecated**
  * [list_consumers](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/webhooks/README.md#list_consumers) - List webhook consumers
  </details>
  <!-- End Available Resources and Operations [operations] -->
  <!-- Start Retries [retries] -->

  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  from codatplatform.utils import BackoffStrategy, RetryConfig
  with CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.settings.create_api_key(request={
          "name": "azure-invoice-finance-processor",
      },
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
      if res is not None:
          
          pass
  ```
  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:
  ```python
  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  from codatplatform.utils import BackoffStrategy, RetryConfig
  with CodatPlatform(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.settings.create_api_key(request={
          "name": "azure-invoice-finance-processor",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Retries [retries] -->
  <!-- Start Error Handling [errors] -->

  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
  By default, an API error will raise a errors.SDKError exception, which has the following properties:
  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |
  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_api_key_async` method may raise the following exceptions:
  | Error Type          | Status Code                            | Content Type     |
  | ------------------- | -------------------------------------- | ---------------- |
  | errors.ErrorMessage | 400, 401, 402, 403, 409, 429, 500, 503 | application/json |
  | errors.SDKError     | 4XX, 5XX                               | \*/\*            |

  ```python
  from codat_platform import CodatPlatform
  from codat_platform.models import errors, shared
  with CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = None
      try:
          res = s.settings.create_api_key(request={
              "name": "azure-invoice-finance-processor",
          })
          if res is not None:
              
              pass
      except errors.ErrorMessage as e:
          
          raise(e)
      except errors.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->
  <!-- Start Server Selection [server] -->


  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:
  ```python
  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  with CodatPlatform(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.settings.create_api_key(request={
          "name": "azure-invoice-finance-processor",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Server Selection [server] -->
  <!-- Start Custom HTTP Client [http-client] -->

  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_platform import CodatPlatform
  import httpx
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatPlatform(client=http_client)
  ```
  or you could wrap the client with your own custom logic:
  ```python
  from codat_platform import CodatPlatform
  from codat_platform.httpclient import AsyncHttpClient
  import httpx
  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient
      def __init__(self, client: AsyncHttpClient):
          self.client = client
      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"
          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )
      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )
  s = CodatPlatform(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->
  <!-- Start Authentication [security] -->


  This SDK supports the following security scheme globally:
  | Name          | Type   | Scheme  |
  | ------------- | ------ | ------- |
  | `auth_header` | apiKey | API key |
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_platform import CodatPlatform
  from codat_platform.models import shared
  with CodatPlatform(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.settings.create_api_key(request={
          "name": "azure-invoice-finance-processor",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Authentication [security] -->
  <!-- Start Debugging [debug] -->

  You can setup your SDK to emit debug logs for SDK requests and responses.
  You can pass your own logger class directly into your SDK.
  ```python
  from codat_platform import CodatPlatform
  import logging
  logging.basicConfig(level=logging.DEBUG)
  s = CodatPlatform(debug_logger=logging.getLogger("codat_platform"))
  ```
  <!-- End Debugging [debug] -->
  <!-- Placeholder for Future Speakeasy SDK Sections -->
  <!-- Start Codat Support Notes -->

  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->
  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 248ee081d38293203ab6c49b5c970682bc2e77e500c649f49758768f40664da4
name: python-codat-sync-for-commerce
arch: src
version: 5.0.0
epoch: 0
release: 1
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-sync-for-commerce-5.0.0-1.src.rpm
checksum_type: sha256
summary:
  Push merchants' data from your ecommerce or point-of-sale (POS) platform into your merchants' accounting platform.

description:
  <!-- Start Codat Tags Table -->

  | Endpoints | Description |
  | :- |:- |
  | Connections | Create new and manage existing data connections for a company. |
  | Sync | Initiate data syncs and monitor their status. |
  | Sync flow settings | Control text and visibility settings for the Sync Flow. |
  | Integrations | Get a list of integrations supported by Sync for Commerce and their logos. |
  | Advanced controls | View and manage mapping configured for a company's commerce sync. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->
  <!-- Start Table of Contents [toc] -->

  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->
  <!-- Start SDK Installation [installation] -->

  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 codat-sync-for-commerce
  ```

  *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 codat-sync-for-commerce
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->


  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->
  <!-- Start SDK Example Usage [usage] -->


  ```python

  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  s = CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  })
  if res is not None:
      
      pass
  ```
  </br>
  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  async def main():
      s = CodatSyncCommerce(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      )
      res = await s.sync_flow_settings.get_config_text_sync_flow_async(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->
  <!-- Start Available Resources and Operations [operations] -->

  <details open>
  <summary>Available methods</summary>

  * [create_company](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#create_company) - Create company
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#get_configuration) - Get company configuration
  * [list_companies](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#list_companies) - List companies
  * [set_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#set_configuration) - Set configuration

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [get_sync_flow_url](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get_sync_flow_url) - Start new sync flow
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [update_authorization](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_authorization) - Update authorization
  * [update_connection](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_connection) - Update connection

  * [get_branding](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get_branding) - Get branding for an integration
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#list) - List integrations

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get) - Get sync status
  * [get_last_successful_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_last_successful_sync) - Last successful sync
  * [get_latest_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_latest_sync) - Latest sync status
  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_status) - Get sync status
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#list) - List sync statuses
  * [request](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#request) - Initiate new sync
  * [request_for_date_range](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#request_for_date_range) - Initiate sync for specific range

  * [get_config_text_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#get_config_text_sync_flow) - Get preferences for text fields
  * [get_visible_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#get_visible_accounts) - List visible accounts
  * [update_config_text_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#update_config_text_sync_flow) - Update preferences for text fields
  * [update_visible_accounts_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#update_visible_accounts_sync_flow) - Update visible accounts
  </details>
  <!-- End Available Resources and Operations [operations] -->
  <!-- Start Retries [retries] -->

  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  from codatsynccommerce.utils import BackoffStrategy, RetryConfig
  s = CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  },
      RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
  if res is not None:
      
      pass
  ```
  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:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  from codatsynccommerce.utils import BackoffStrategy, RetryConfig
  s = CodatSyncCommerce(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  })
  if res is not None:
      
      pass
  ```
  <!-- End Retries [retries] -->
  <!-- Start Error Handling [errors] -->

  Handling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
  | Error Object            | Status Code             | Content Type            |
  | ----------------------- | ----------------------- | ----------------------- |
  | errors.ErrorMessage     | 401,402,403,429,500,503 | application/json        |
  | errors.SDKError         | 4xx-5xx                 | */*                     |

  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import errors, shared
  s = CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = None
  try:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)
  ```
  <!-- End Error Handling [errors] -->
  <!-- Start Server Selection [server] -->


  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |

  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  s = CodatSyncCommerce(
      server_idx=0,
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  })
  if res is not None:
      
      pass
  ```

  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:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  s = CodatSyncCommerce(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  })
  if res is not None:
      
      pass
  ```
  <!-- End Server Selection [server] -->
  <!-- Start Custom HTTP Client [http-client] -->

  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  import httpx
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatSyncCommerce(client=http_client)
  ```
  or you could wrap the client with your own custom logic:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.httpclient import AsyncHttpClient
  import httpx
  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient
      def __init__(self, client: AsyncHttpClient):
          self.client = client
      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"
          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )
      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )
  s = CodatSyncCommerce(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->
  <!-- Start Authentication [security] -->


  This SDK supports the following security scheme globally:
  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  s = CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )
  res = s.sync_flow_settings.get_config_text_sync_flow(request={
      "locale": shared.Locale.EN_US,
  })
  if res is not None:
      
      pass
  ```
  <!-- End Authentication [security] -->
  <!-- Start Debugging [debug] -->

  You can setup your SDK to emit debug logs for SDK requests and responses.
  You can pass your own logger class directly into your SDK.
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  import logging
  logging.basicConfig(level=logging.DEBUG)
  s = CodatSyncCommerce(debug_logger=logging.getLogger("codat_sync_for_commerce"))
  ```
  <!-- End Debugging [debug] -->
  <!-- Placeholder for Future Speakeasy SDK Sections -->
  <!-- Start Codat Support Notes -->

  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->
  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 9289d5219330ce073573ec95ff275cb2756eecffc3d102a19e7e9c6653e65d21
name: python-codat-sync-for-commerce
arch: src
version: 6.0.0
epoch: 0
release: 1
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-sync-for-commerce-6.0.0-1.src.rpm
checksum_type: sha256
summary:
  Push merchants' data from your ecommerce or point-of-sale (POS) platform into your merchants' accounting software.

description:
  <!-- Start Codat Tags Table -->

  | Endpoints | Description |
  | :- |:- |
  | Connections | Create new and manage existing data connections for a company. |
  | Sync | Initiate data syncs and monitor their status. |
  | Sync flow settings | Control text and visibility settings for the Sync Flow. |
  | Integrations | Get a list of integrations supported by Sync for Commerce and their logos. |
  | Advanced controls | View and manage mapping configured for a company's commerce sync. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->
  <!-- Start Table of Contents [toc] -->

  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->
  <!-- Start SDK Installation [installation] -->

  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 codat-sync-for-commerce
  ```

  *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 codat-sync-for-commerce
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->


  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->
  <!-- Start SDK Example Usage [usage] -->


  ```python

  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  with CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  ```
  </br>
  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  async def main():
      async with CodatSyncCommerce(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      ) as s:
          res = await s.sync_flow_settings.get_config_text_sync_flow_async(request={
              "locale": shared.Locale.EN_US,
          })
          if res is not None:
              
              pass
  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->
  <!-- Start Available Resources and Operations [operations] -->

  <details open>
  <summary>Available methods</summary>

  * [create_company](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#create_company) - Create company
  * [get_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#get_configuration) - Get company configuration
  * [list_companies](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#list_companies) - List companies
  * [set_configuration](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/advancedcontrols/README.md#set_configuration) - Set configuration

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [get_sync_flow_url](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get_sync_flow_url) - Start new sync flow
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [update_authorization](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_authorization) - Update authorization
  * [update_connection](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#update_connection) - Update connection

  * [get_branding](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#get_branding) - Get branding for an integration
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/integrations/README.md#list) - List integrations

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get) - Get sync status
  * [get_last_successful_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_last_successful_sync) - Last successful sync
  * [get_latest_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_latest_sync) - Latest sync status
  * [get_status](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_status) - Get sync status
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#list) - List sync statuses
  * [request](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#request) - Initiate new sync
  * [request_for_date_range](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#request_for_date_range) - Initiate sync for specific range

  * [get_config_text_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#get_config_text_sync_flow) - Get preferences for text fields
  * [get_visible_accounts](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#get_visible_accounts) - List visible accounts
  * [update_config_text_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#update_config_text_sync_flow) - Update preferences for text fields
  * [update_visible_accounts_sync_flow](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/syncflowsettings/README.md#update_visible_accounts_sync_flow) - Update visible accounts
  </details>
  <!-- End Available Resources and Operations [operations] -->
  <!-- Start Retries [retries] -->

  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  from codatsynccommerce.utils import BackoffStrategy, RetryConfig
  with CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      },
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
      if res is not None:
          
          pass
  ```
  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:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  from codatsynccommerce.utils import BackoffStrategy, RetryConfig
  with CodatSyncCommerce(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  ```
  <!-- End Retries [retries] -->
  <!-- Start Error Handling [errors] -->

  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
  By default, an API error will raise a errors.SDKError exception, which has the following properties:
  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |
  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_config_text_sync_flow_async` method may raise the following exceptions:
  | Error Type          | Status Code                  | Content Type     |
  | ------------------- | ---------------------------- | ---------------- |
  | errors.ErrorMessage | 401, 402, 403, 429, 500, 503 | application/json |
  | errors.SDKError     | 4XX, 5XX                     | \*/\*            |

  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import errors, shared
  with CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = None
      try:
          res = s.sync_flow_settings.get_config_text_sync_flow(request={
              "locale": shared.Locale.EN_US,
          })
          if res is not None:
              
              pass
      except errors.ErrorMessage as e:
          
          raise(e)
      except errors.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->
  <!-- Start Server Selection [server] -->


  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:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  with CodatSyncCommerce(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  ```
  <!-- End Server Selection [server] -->
  <!-- Start Custom HTTP Client [http-client] -->

  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  import httpx
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatSyncCommerce(client=http_client)
  ```
  or you could wrap the client with your own custom logic:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.httpclient import AsyncHttpClient
  import httpx
  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient
      def __init__(self, client: AsyncHttpClient):
          self.client = client
      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"
          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )
      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )
  s = CodatSyncCommerce(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->
  <!-- Start Authentication [security] -->


  This SDK supports the following security scheme globally:
  | Name          | Type   | Scheme  |
  | ------------- | ------ | ------- |
  | `auth_header` | apiKey | API key |
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  from codat_sync_for_commerce.models import shared
  with CodatSyncCommerce(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.sync_flow_settings.get_config_text_sync_flow(request={
          "locale": shared.Locale.EN_US,
      })
      if res is not None:
          
          pass
  ```
  <!-- End Authentication [security] -->
  <!-- Start Debugging [debug] -->

  You can setup your SDK to emit debug logs for SDK requests and responses.
  You can pass your own logger class directly into your SDK.
  ```python
  from codat_sync_for_commerce import CodatSyncCommerce
  import logging
  logging.basicConfig(level=logging.DEBUG)
  s = CodatSyncCommerce(debug_logger=logging.getLogger("codat_sync_for_commerce"))
  ```
  <!-- End Debugging [debug] -->
  <!-- Placeholder for Future Speakeasy SDK Sections -->
  <!-- Start Codat Support Notes -->

  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->
  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 323addb04ba226966b675ea31e7c7992d995a45611978e06631ae2842e2c966f
name: python-codat-sync-for-expenses
arch: src
version: 6.2.0
epoch: 0
release: 1
summary: Push expenses to accounting platforms.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-sync-for-expenses-6.2.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Library Description -->
  ﻿Embedded accounting integrations for corporate card providers.
  <!-- End Codat Library Description -->

  <!-- Start SDK Installation [installation] -->


  ```bash
  pip install codat-sync-for-expenses
  ```
  <!-- End SDK Installation [installation] -->


  <!-- Start SDK Example Usage [usage] -->




  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared

  s = codatsyncexpenses.CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req)

  if res.company is not None:
      
      pass

  ```
  <!-- End SDK Example Usage [usage] -->

  <!-- Start Available Resources and Operations [operations] -->




  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [create_partner_expense_connection](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create_partner_expense_connection) - Create partner expense connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#create) - Create account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#get_create_model) - Get create account model



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#create) - Create customer
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get) - Get customer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list) - List customers
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#update) - Update customer



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#create) - Create supplier
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get) - Get supplier
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list) - List suppliers
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#update) - Update supplier



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get) - Get data status
  * [get_pull_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get_pull_operation) - Get pull operation
  * [list_pull_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#list_pull_operations) - List pull operations
  * [refresh_all_data_types](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#refresh_all_data_types) - Refresh all data
  * [refresh_data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#refresh_data_type) - Refresh data type



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushoperations/README.md#get) - Get push operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushoperations/README.md#list) - List push operations



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#get) - Get company configuration
  * [get_mapping_options](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#get_mapping_options) - Mapping options
  * [set](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#set) - Set company configuration



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/expenses/README.md#create) - Create expense transaction
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/expenses/README.md#update) - Update expense transactions



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reimbursements/README.md#create) - Create reimbursable expense transaction
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reimbursements/README.md#update) - Update reimbursable expense transaction



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get) - Get sync status
  * [get_last_successful_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_last_successful_sync) - Last successful sync
  * [get_latest_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_latest_sync) - Latest sync status
  * [initiate_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#initiate_sync) - Initiate sync
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#list) - List sync statuses



  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionstatus/README.md#get) - Get sync transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionstatus/README.md#list) - List sync transactions



  * [upload](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/attachments/README.md#upload) - Upload attachment



  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#create) - Create transfer transaction
  <!-- End Available Resources and Operations [operations] -->



  <!-- Start Retries [retries] -->


  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared
  from codatsyncexpenses.utils import BackoffStrategy, RetryConfig

  s = codatsyncexpenses.CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req,
      RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))

  if res.company is not None:
      
      pass

  ```

  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:
  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared
  from codatsyncexpenses.utils import BackoffStrategy, RetryConfig

  s = codatsyncexpenses.CodatSyncExpenses(
      retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req)

  if res.company is not None:
      
      pass

  ```
  <!-- End Retries [retries] -->

  <!-- Start Error Handling [errors] -->


  Handling errors in this SDK should largely match your expectations.  All operations return a response object or raise an error.  If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

  | Error Object                | Status Code                 | Content Type                |
  | --------------------------- | --------------------------- | --------------------------- |
  | errors.ErrorMessage         | 400,401,402,403,429,500,503 | application/json            |
  | errors.SDKError             | 4xx-5xx                     | */*                         |



  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import errors, shared

  s = codatsyncexpenses.CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = None
  try:
      res = s.companies.create(req)
  except errors.ErrorMessage as e:
      
      raise(e)
  except errors.SDKError as e:
      
      raise(e)

  if res.company is not None:
      
      pass

  ```
  <!-- End Error Handling [errors] -->

  <!-- Start Server Selection [server] -->




  You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

  | # | Server | Variables |
  | - | ------ | --------- |
  | 0 | `https://api.codat.io` | None |



  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared

  s = codatsyncexpenses.CodatSyncExpenses(
      server_idx=0,
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req)

  if res.company is not None:
      
      pass

  ```




  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:
  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared

  s = codatsyncexpenses.CodatSyncExpenses(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req)

  if res.company is not None:
      
      pass

  ```
  <!-- End Server Selection [server] -->

  <!-- Start Custom HTTP Client [http-client] -->


  The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.

  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  import codatsyncexpenses
  import requests

  http_client = requests.Session()
  http_client.headers.update({'x-custom-header': 'someValue'})
  s = codatsyncexpenses.CodatSyncExpenses(client=http_client)
  ```
  <!-- End Custom HTTP Client [http-client] -->

  <!-- Start Authentication [security] -->




  This SDK supports the following security scheme globally:

  | Name          | Type          | Scheme        |
  | ------------- | ------------- | ------------- |
  | `auth_header` | apiKey        | API key       |

  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  import codatsyncexpenses
  from codatsyncexpenses.models import shared

  s = codatsyncexpenses.CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  )

  req = shared.CompanyRequestBody(
      name='Bank of Dave',
      description='Requested early access to the new financing scheme.',
  )

  res = s.companies.create(req)

  if res.company is not None:
      
      pass

  ```
  <!-- End Authentication [security] -->

  <!-- Placeholder for Future Speakeasy SDK Sections -->

  <!-- Start Codat Support Notes -->


  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->

  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 7bcd343741e1dba0dd86ef351fd680b6e4f29194cf6b157147e16d439638bfb2
name: python-codat-sync-for-expenses
arch: src
version: 7.0.0
epoch: 0
release: 1
summary: Push expenses to accounting software.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-sync-for-expenses-7.0.0-1.src.rpm
checksum_type: sha256
description:
  <!-- Start Codat Tags Table -->

  | Endpoints | Description |
  | :- |:- |
  | Companies | Create and manage your SMB users' companies. |
  | Connections | Create new and manage existing data connections for a company. |
  | Configuration | View and manage mapping configuration and defaults for expense transactions. |
  | Sync | Monitor the status of data syncs. |
  | Expenses | Create and update transactions that represent your customers' spend. |
  | Transfers | Create and update transactions that represent the movement of your customers' money. |
  | Reimbursements | Create and update transactions that represent your customers' repayable spend. |
  | Attachments | Attach receipts to a transaction for a complete audit trail. |
  | Transaction status | Monitor the status of individual transactions in data syncs. |
  | Manage data | Control and monitor the retrieval of data from an integration. |
  | Push operations | View historic push operations. |
  | Accounts | Create accounts and view account schemas. |
  | Customers | Get, create, and update customers. |
  | Suppliers | Get, create, and update suppliers. |
  <!-- End Codat Tags Table -->
  <!-- End Summary [summary] -->
  <!-- Start Table of Contents [toc] -->

  * [SDK Installation](https://github.com/codatio/client-sdk-python/blob/master/#sdk-installation)
  * [IDE Support](https://github.com/codatio/client-sdk-python/blob/master/#ide-support)
  * [SDK Example Usage](https://github.com/codatio/client-sdk-python/blob/master/#sdk-example-usage)
  * [Available Resources and Operations](https://github.com/codatio/client-sdk-python/blob/master/#available-resources-and-operations)
  * [File uploads](https://github.com/codatio/client-sdk-python/blob/master/#file-uploads)
  * [Retries](https://github.com/codatio/client-sdk-python/blob/master/#retries)
  * [Error Handling](https://github.com/codatio/client-sdk-python/blob/master/#error-handling)
  * [Server Selection](https://github.com/codatio/client-sdk-python/blob/master/#server-selection)
  * [Custom HTTP Client](https://github.com/codatio/client-sdk-python/blob/master/#custom-http-client)
  * [Authentication](https://github.com/codatio/client-sdk-python/blob/master/#authentication)
  * [Debugging](https://github.com/codatio/client-sdk-python/blob/master/#debugging)
  <!-- End Table of Contents [toc] -->
  <!-- Start SDK Installation [installation] -->

  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 codat-sync-for-expenses
  ```

  *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 codat-sync-for-expenses
  ```
  <!-- End SDK Installation [installation] -->

  <!-- Start IDE Support [idesupport] -->


  Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
  - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
  <!-- End IDE Support [idesupport] -->
  <!-- Start SDK Example Usage [usage] -->


  ```python

  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  with CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
      })
      if res is not None:
          
          pass
  ```
  </br>
  The same SDK client can also be used to make asychronous requests by importing asyncio.
  ```python

  import asyncio
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  async def main():
      async with CodatSyncExpenses(
          security=shared.Security(
              auth_header="Basic BASE_64_ENCODED(API_KEY)",
          ),
      ) as s:
          res = await s.companies.create_async(request={
              "name": "Technicalium",
          })
          if res is not None:
              
              pass
  asyncio.run(main())
  ```
  <!-- End SDK Example Usage [usage] -->
  <!-- Start Available Resources and Operations [operations] -->

  <details open>
  <summary>Available methods</summary>

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#create) - Create account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/accounts/README.md#get_create_model) - Get create account model

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/adjustments/README.md#create) - Create adjustment transaction

  * [upload](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/attachments/README.md#upload) - Upload attachment

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#create) - Create bank account
  * [get_create_model](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/bankaccounts/README.md#get_create_model) - Get create bank account model

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#create) - Create company
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#delete) - Delete a company
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#get) - Get company
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#list) - List companies
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companies/README.md#update) - Update company

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/companyinfo/README.md#get) - Get company info

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#get) - Get company configuration
  * [set](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/configuration/README.md#set) - Set company configuration

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create) - Create connection
  * [create_partner_expense_connection](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#create_partner_expense_connection) - Create partner expense connection
  * [delete](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#delete) - Delete connection
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#get) - Get connection
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#list) - List connections
  * [unlink](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/connections/README.md#unlink) - Unlink connection

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#create) - Create customer
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#get) - Get customer
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#list) - List customers
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/customers/README.md#update) - Update customer

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/expenses/README.md#create) - Create expense transaction
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/expenses/README.md#update) - Update expense transactions

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get) - Get data status
  * [get_pull_operation](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#get_pull_operation) - Get pull operation
  * [list_pull_operations](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#list_pull_operations) - List pull operations
  * [refresh_all_data_types](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#refresh_all_data_types) - Refresh all data
  * [refresh_data_type](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/managedata/README.md#refresh_data_type) - Refresh data type

  * [get_mapping_options](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/mappingoptions/README.md#get_mapping_options) - Mapping options

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushoperations/README.md#get) - Get push operation
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/pushoperations/README.md#list) - List push operations

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reimbursements/README.md#create) - Create reimbursable expense transaction
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/reimbursements/README.md#update) - Update reimbursable expense transaction

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#create) - Create supplier
  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#get) - Get supplier
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#list) - List suppliers
  * [update](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/suppliers/README.md#update) - Update supplier

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get) - Get sync status
  * [get_last_successful_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_last_successful_sync) - Last successful sync
  * [get_latest_sync](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#get_latest_sync) - Latest sync status
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/sync/README.md#list) - List sync statuses

  * [get](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionstatus/README.md#get) - Get sync transaction
  * [list](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transactionstatus/README.md#list) - List sync transactions

  * [create](https://github.com/codatio/client-sdk-python/blob/master/docs/sdks/transfers/README.md#create) - Create transfer transaction
  </details>
  <!-- End Available Resources and Operations [operations] -->
  <!-- Start File uploads [file-upload] -->

  Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
  > [!TIP]
  >
  > For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
  >
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  with CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.attachments.upload(request={
          "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
          "sync_id": "6fb40d5e-b13e-11ed-afa1-0242ac120002",
          "transaction_id": "336694d8-2dca-4cb5-a28d-3ccb83e55eee",
      })
      if res is not None:
          
          pass
  ```
  <!-- End File uploads [file-upload] -->
  <!-- Start Retries [retries] -->

  Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
  To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  from codatsyncexpenses.utils import BackoffStrategy, RetryConfig
  with CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
      },
          RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
      if res is not None:
          
          pass
  ```
  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:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  from codatsyncexpenses.utils import BackoffStrategy, RetryConfig
  with CodatSyncExpenses(
      retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Retries [retries] -->
  <!-- Start Error Handling [errors] -->

  Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
  By default, an API error will raise a errors.SDKError exception, which has the following properties:
  | Property        | Type             | Description           |
  |-----------------|------------------|-----------------------|
  | `.status_code`  | *int*            | The HTTP status code  |
  | `.message`      | *str*            | The error message     |
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
  | `.body`         | *str*            | The response content  |
  When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_async` method may raise the following exceptions:
  | Error Type          | Status Code                       | Content Type     |
  | ------------------- | --------------------------------- | ---------------- |
  | errors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json |
  | errors.SDKError     | 4XX, 5XX                          | \*/\*            |

  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import errors, shared
  with CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = None
      try:
          res = s.companies.create(request={
              "name": "Technicalium",
          })
          if res is not None:
              
              pass
      except errors.ErrorMessage as e:
          
          raise(e)
      except errors.SDKError as e:
          
          raise(e)
  ```
  <!-- End Error Handling [errors] -->
  <!-- Start Server Selection [server] -->


  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:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  with CodatSyncExpenses(
      server_url="https://api.codat.io",
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Server Selection [server] -->
  <!-- Start Custom HTTP Client [http-client] -->

  The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library.  In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
  Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
  This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
  For example, you could specify a header for every request that this sdk makes as follows:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  import httpx
  http_client = httpx.Client(headers={"x-custom-header": "someValue"})
  s = CodatSyncExpenses(client=http_client)
  ```
  or you could wrap the client with your own custom logic:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.httpclient import AsyncHttpClient
  import httpx
  class CustomClient(AsyncHttpClient):
      client: AsyncHttpClient
      def __init__(self, client: AsyncHttpClient):
          self.client = client
      async def send(
          self,
          request: httpx.Request,
          *,
          stream: bool = False,
          auth: Union[
              httpx._types.AuthTypes, httpx._client.UseClientDefault, None
          ] = httpx.USE_CLIENT_DEFAULT,
          follow_redirects: Union[
              bool, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
      ) -> httpx.Response:
          request.headers["Client-Level-Header"] = "added by client"
          return await self.client.send(
              request, stream=stream, auth=auth, follow_redirects=follow_redirects
          )
      def build_request(
          self,
          method: str,
          url: httpx._types.URLTypes,
          *,
          content: Optional[httpx._types.RequestContent] = None,
          data: Optional[httpx._types.RequestData] = None,
          files: Optional[httpx._types.RequestFiles] = None,
          json: Optional[Any] = None,
          params: Optional[httpx._types.QueryParamTypes] = None,
          headers: Optional[httpx._types.HeaderTypes] = None,
          cookies: Optional[httpx._types.CookieTypes] = None,
          timeout: Union[
              httpx._types.TimeoutTypes, httpx._client.UseClientDefault
          ] = httpx.USE_CLIENT_DEFAULT,
          extensions: Optional[httpx._types.RequestExtensions] = None,
      ) -> httpx.Request:
          return self.client.build_request(
              method,
              url,
              content=content,
              data=data,
              files=files,
              json=json,
              params=params,
              headers=headers,
              cookies=cookies,
              timeout=timeout,
              extensions=extensions,
          )
  s = CodatSyncExpenses(async_client=CustomClient(httpx.AsyncClient()))
  ```
  <!-- End Custom HTTP Client [http-client] -->
  <!-- Start Authentication [security] -->


  This SDK supports the following security scheme globally:
  | Name          | Type   | Scheme  |
  | ------------- | ------ | ------- |
  | `auth_header` | apiKey | API key |
  You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  from codat_sync_for_expenses.models import shared
  with CodatSyncExpenses(
      security=shared.Security(
          auth_header="Basic BASE_64_ENCODED(API_KEY)",
      ),
  ) as s:
      res = s.companies.create(request={
          "name": "Technicalium",
      })
      if res is not None:
          
          pass
  ```
  <!-- End Authentication [security] -->
  <!-- Start Debugging [debug] -->

  You can setup your SDK to emit debug logs for SDK requests and responses.
  You can pass your own logger class directly into your SDK.
  ```python
  from codat_sync_for_expenses import CodatSyncExpenses
  import logging
  logging.basicConfig(level=logging.DEBUG)
  s = CodatSyncExpenses(debug_logger=logging.getLogger("codat_sync_for_expenses"))
  ```
  <!-- End Debugging [debug] -->
  <!-- Placeholder for Future Speakeasy SDK Sections -->
  <!-- Start Codat Support Notes -->

  If you encounter any challenges while utilizing our SDKs, please don't hesitate to reach out for assistance.
  You can raise any issues by contacting your dedicated Codat representative or reaching out to our [support team](https://github.com/codatio/client-sdk-python/blob/master/mailto:support@codat.io).
  We're here to help ensure a smooth experience for you.
  <!-- End Codat Support Notes -->
  <!-- Start Codat Generated By -->

  <!-- End Codat Generated By -->


pkgId: 3734a838979dfc846aa7df5fa34f33a5d53003f2d433d326480a1203cc1f0065
name: python-codat-sync-for-payables
arch: src
version: 8.0.2
epoch: 0
release: 1
summary: Streamline your customers' accounts payable workflow.
url: https://github.com/codatio/client-sdk-python.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codat-sync-for-payables-8.0.2-1.src.rpm
checksum_type: sha256
description:
  | Integration                   | Supported |
  |-------------------------------|-----------|
  | FreeAgent                     | Yes       |
  | QuickBooks Online             | Yes       |
  | Oracle NetSuite               | Yes       |


pkgId: 74e48a7331323f6c8c995555a749df6685e9e2c2bcfd4dc7cef809e422e90d7f
name: python-code-annotations
arch: src
version: 1.8.0
epoch: 0
release: 1
summary: Extensible tools for parsing annotations in codebases
url: https://github.com/openedx/code-annotations
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-annotations-1.8.0-1.src.rpm
checksum_type: sha256
description:
  |pypi-badge| |CI| |codecov-badge| |doc-badge| |pyversions-badge|
  |license-badge|
  Extensible tools for parsing annotations in codebases


pkgId: cd21fdb8b6c87bcdcab21eaa51e6b8bbd2193211fde6b8e3e1f71f0d3ac9196f
name: python-code-assistant
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: A FastHTML app that builds FastHTML apps
url: https://pypi.org/project/code-assistant/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-assistant-0.1.1-1.src.rpm
checksum_type: sha256
description:
  A FastHTML app that makes FastHTML apps.

  [![commits](https://img.shields.io/github/commit-activity/m/phact/code-assistant)](https://github.com/phact/code-assistant/commits/main)
  [![Github Last Commit](https://img.shields.io/github/last-commit/phact/code-assistant)](https://github.com/phact/code-assistant/commits/main)
  [![Release](https://github.com/phact/code-assistant/actions/workflows/releases.yml/badge.svg?branch=main)](https://github.com/phact/code-assistant/actions/workflows/releases.yml)
  [![Docker build and publish](https://github.com/phact/code-assistant/actions/workflows/docker.yml/badge.svg)](https://github.com/phact/code-assistant/actions/workflows/docker.yml)
  [![PyPI - Downloads](https://img.shields.io/pypi/dw/code-assistant?label=pypi%20downloads)](https://badge.fury.io/py/code-assistant)
  [![Dockerhub](https://img.shields.io/static/v1?label=Pull%20from&message=DockerHub&color=blue&logo=Docker&style=flat-square)](https://hub.docker.com/r/phact/code-assistant)
  [![Discord chat](https://img.shields.io/static/v1?label=Chat%20on&message=Discord&color=blue&logo=Discord&style=flat-square)](https://discord.gg/MEFVXUvsuy)
  [![Stars](https://img.shields.io/github/stars/phact/code-assistant?style=social)](https://github.com/phact/code-assistant/stargazers)





   - [X] LSP support (code actions)
   - [X] LSP support (retrieve diagnostics)
   - [X] LSP Support (linter/formatter with `ruff server`)
   - [ ] LSP Support (type checker, use pyright or wait for ruff red-knot? https://github.com/astral-sh/ruff/issues/12701)
   - [ ] LSP support (use diagnostics in LLM context)
   - [X] Self-healing (backend runtime errors)
   - [X] Self-healing (frontend runtime errors)
   - [X] python indentation helper with tree sitter
   - [X] FastHTML specific validations using ast-grep
   - [X] FastHTML documentation llm context
   - [X] HTMX documentation llm context
   - [ ] fastlite documentation llm context
   - [ ] fastsql documentation llm context
   - [ ] fastastra documentation llm context
   - [ ] dynamic openapi spec llm context
   - [ ] dynamic sample apps llm context
   - [ ] astra-assistants documentation llm context
   - [ ] Multi-file support
   - [ ] Multi-turn generation


   - [X] Live app preview
   - [X] Drive generated_apps dir with env var CA_GENERATED_APPS_DIR
   - [X] Add third party model support to frontend
   - [X] Improve third party auth
   - [ ] ollama integration guide / docs

   
   - [ ] Sessions
   - [ ] Sandboxing (probably with e2b)


  code-assistant is built on OpenAI's Assistant API and uses astra-assistants to support other models including claude and local models.



  Install with pip:

      pip install code-assistant

  Run:

      code-assistant

  this will start the web server on port 5001 and will create a generated_apps directory on your current working directory. You can override this directory by setting the CA_GENERATED_APPS_DIR environment variable.

      export CA_GENERATED_APPS_DIR="~/my_apps"
      code-assistant



  use pipx or uvx if you're a uv user to run as an isolated program:

      pipx run code-assistant

  or

      uvx code-assistant




  [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/uLhG0l?referralCode=A6Uk1R)



      docker run -p 5001:5001 phact/code-assistant

  optionally pass auth credentials as environment variables:

      docker run -p 5001:5001 -e OPENAI_API_KEY="your-key" phact/code-assistant

  or

      docker run -p 5001:5001 -e ANTHROPIC_API_KEY="your-key" -e ASTRA_DB_APPLICATION_TOKEN="your token" phact/code-assistant

  etc depending on your LLM provider.



  If you have not provided credentials via env vars the UI will prompt you for credentials. Credentials inputed via the UI are not persisted.

  [![video](assets/code_assistant_models.gif)](https://www.youtube.com/watch?v=9Vk7t7wtd4E)

  To avoid manual entry, set up environment variables for [astradb](https://astra.datastax.com/) [required for any non OpenAI models] and your LLM provider of choice.:

  ```



  export ASTRA_DB_APPLICATION_TOKEN=""


  export OPENAI_API_KEY=""


  export GROQ_API_KEY=""


  export ANTHROPIC_API_KEY=""


  export GEMINI_API_KEY=""


  export PERPLEXITYAI_API_KEY=""


  export COHERE_API_KEY=""


  export AWS_REGION_NAME=""
  export AWS_ACCESS_KEY_ID=""
  export AWS_SECRET_ACCESS_KEY=""


  export GOOGLE_JSON_PATH=""
  export GOOGLE_PROJECT_ID=""


  ```


pkgId: 0da0f01d528d1e72657262a624b2cf5543e502ddd151032b83070dafa1c35f75
name: python-code-bert-score
arch: src
version: 0.4.1
epoch: 0
release: 1
summary: PyTorch implementation of Code BERT score
url: https://github.com/neulab/code-bert-score
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-bert-score-0.4.1-1.src.rpm
checksum_type: sha256
description:
  * [Example](#example)
  * [How does it work?](#how-does-it-work)
  * [Usage](#usage)
  * [Additional Features](#additional-features)
  * [Backend Model](#backend-model)
  * [Training](#training)
  * [Evaluation](#evaluation)
      + [Human Evaluation](#human-evaluation)
      + [Functional Correctness](#functional-correctness)
  * [Citation](#citation)

  ![](./images/example.png "Example")
  Figure (a) shows a reference code snippet in Java. Figures (b) and (c) show two generated predictions. Among these two candidates and given the reference, BLEU prefers (scores higher) the code in (b), which is not functionally equivalent to the reference, while CodeBERTScore prefers the code in (c), which is functionaly equivalent to the reference.

  ![](./images/flow.png "Example")
  As BERTScore, CodeBERTScore leverages the pre-trained contextual embeddings from a model such as CodeBERT and matches
  words in candidate and reference sentences by cosine similarity.
  Differently from BERTScore, CodeBERTScore also encodes natural language input or other context along with the generated code, but does not use that context to compute cosine similarities.
  This example shows how CodeBERTScore can compute the similarity between the Python expressions `x ** 0.5` and `math.sqrt(x)`, which are functionally equivalent, even though they have very few overlapping tokens.

  ```
  import code_bert_score
  pred_results = code_bert_score.score(cands=predictions, refs=refs, lang='python')
  ```
  Where `pred_results` is a 4-tuple of `(precision, recall, F1, F3)`, where each is a 1-D tensor of scores for each prediction-reference pair. `F3` is similar to the well-known `F1` score, that considers recall 3 times as important as precision. See the [definition on Wikipedia](https://en.wikipedia.org/wiki/F-score#F%CE%B2_score).
  See our [example.py](./example.py) script. Additional details are shown in the original BERTScore [demo notebook](./example/Demo.ipynb).

  We fine-tuned the `microsoft/codebert-base-mlm` model for 1,000,000 steps (with `batch_size=32`) on several languages separately.
  We released the following models to the Huggingface hub:
  * `neulab/codebert-python` (the default model for `lang='python'`)
  * `neulab/codebert-javascript` (the default model for `lang='javascript'` or `'js'`)
  * `neulab/codebert-c` (the default model for `lang='c'`)
  * `neulab/codebert-cpp` (the default model for `lang='cpp'` or `'c++'`)
  * `neulab/codebert-java` (the default model for `lang='java'`)
  The appropriate model will be loaded automatically when passing the `lang` argument to the `score(..)` function, for example: `lang='python'`.
  For other uses, these models can be loaded using (for example):
  ```python
  from transformers import AutoTokenizer, AutoModelForMaskedLM
  tokenizer = AutoTokenizer.from_pretrained("neulab/codebert-python")
  model = AutoModelForMaskedLM.from_pretrained("neulab/codebert-python")
  ```

  * We found that in NL->Code problems, more accurate results are achieved by encoding the NL `sources` with the code prediction, but then measuring similarity only for the encoded code:
  ```
  pred_results = code_bert_score.score(cands=predictions, refs=refs, lang='python', sources=sources)
  ```
  * We also found that using Inverse Document Frequencies improve the results, similarly to the original BERTScore. We included an example script that shows how to precompute them here [compute_idf.py](https://github.com/neulab/code-bert-score/blob/main/compute_idf.py). Then, the resulting dictionary can be used with the argument `idf=idf_dict`.
  Our IDF dicts can be found in [./idf_dicts/](./idf_dicts/).
  * Tuning the layer that the similarity is computed from is also helpful, using `num_layers=N` where `N` is between 5-10:
  ![](./images/layer.jpg "Layers")
  * We found that more accurate results are achieved by encoding the *entire* inputs, but measures the similarity only between non-punctuation and non-whitespace tokens. To disable the removal of punctuation toksn, use `no_punc=False`.
  See also our [example.py](./example.py) script. Additional details are shown in the original BERTScore [demo notebook](./example/Demo.ipynb).

  The [`run_mlm.py`](./run_mlm.py) script can be used to fine-tune the base model `microsoft/codebert-base-mlm` on specific languages.

  The code to reproduce the results in the paper can be found in the [evaluation](./evaluation/README.md).

  ![](./images/human.png "Example")
  We find that CodeBERTScore is more correlated with human preference compared to a variety of common metrics. See more details in the [paper](https://arxiv.org/pdf/2302.05527.pdf).

  ![](./images/functional.png "Example")
  We find that CodeBERTScore is more correlated with functional correctness compared to a variety of common metrics. See more details in the [paper](https://arxiv.org/pdf/2302.05527.pdf).

  ```
  @article{zhou2023codebertscore,
    url = {https://arxiv.org/abs/2302.05527},
    author = {Zhou, Shuyan and Alon, Uri and Agarwal, Sumit and Neubig, Graham},
    title = {CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code},
    publisher = {arXiv},
    year = {2023},
  }
  ```


pkgId: 72b328ed4eb5945ecc395996de2728807a50c951a51f6405855e7e09cd85de03
name: python-code-collator
arch: src
version: 0.20.0
epoch: 0
release: 1
summary: A CLI tool to aggregate codebase into a single Markdown file
url: https://github.com/tawanda-kembo/code-collator
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-collator-0.20.0-1.src.rpm
checksum_type: sha256
description:
  Code Collator is a powerful CLI tool designed to streamline your code review and documentation process by collating your entire codebase into a single, organised Markdown file. This is particularly useful for sharing with AI tools like ChatGPT or Claude for analysis, troubleshooting, or documentation.



  Have you ever needed to provide a comprehensive overview of your codebase for a code review, AI analysis, or detailed documentation? Code Collator simplifies this task by aggregating all your code files into a single Markdown file. This makes it easy to:

  - Share your code with AI tools like ChatGPT or Claude for intelligent analysis.
  - Generate a unified document for code reviews or team collaboration.
  - Create comprehensive documentation for your projects with minimal effort.



  - **Full Codebase Collation**: Collates all files in the specified directory and subdirectories into one Markdown file.
  - **.gitignore Support**: Automatically ignores files specified in the `.gitignore` file if one exists.
  - **Customizable Output**: Outputs a single Markdown file named `collated-code.md` by default, with options to specify the path to the codebase directory and output file name.
  - **Binary File Inclusion**: Includes binary files such as images in the output with a note about their file type.
  - **Comment Exclusion Option**: Allows users to exclude comments and docstrings from the collated code.
  - **Help Command**: Provides a help command to display usage instructions.



  [![Watch the demo video]([https://img.youtube.com/vi/e8Ep_NOi_xU/0.jpg](https://i.ytimg.com/vi/e8Ep_NOi_xU/maxresdefault.jpg))](https://youtu.be/e8Ep_NOi_xU)

  *Click the image above to watch a hands-on demo of how Code Collator works.*



  You can easily install Code Collator using pip:

  ```sh
  pip install code-collator


pkgId: 599e030dae2c674f06dfcc59e5ea89a045148bc111c4cd2a45ddf416c909ca16
name: python-code-complexity-pro
arch: src
version: 1.1.2
epoch: 0
release: 1
summary: A Python tool for analyzing code complexity
url: https://github.com/yourusername/code-complexity-pro
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-complexity-pro-1.1.2-1.src.rpm
checksum_type: sha256
description:
  This is a command-line tool that analyzes the complexity of source code files using Groq's LLM API. It supports multiple file inputs, customizable AI model selection, and various configuration options to suit your workflow. The project is **Code-Complexity-Pro**, and here you will find everything you need to know about using this tool.



  - **Version Display**: Use the `--version` or `-v` flag to display the tool's name and current version.
  - **Help/Usage Instructions**: Use the `--help` or `-h` flag to display how to run the tool, along with available flags and arguments.
  - **File Input**: Analyze one or more source code files.
  - **Customizable Output**: By default, results are printed to the terminal (stdout), but you can specify an output file using the `--output` or `-o` flag.
  - **AI Model Selection**: Specify a model for the analysis using the `--model` or `-m` flag (default is `llama-v2`).
  - **API Key Configuration**: API keys can be passed via the `--api-key` or `-a` flag, or you can configure them in a `.env` file.
  - **Error Logging**: All debug and error messages are logged to `stderr`, keeping output clean.



  You can run the tool from the command line with various flags and options. Here are some examples:


  ```bash
  python main.py --version
  ```


  ```bash
  python main.py --help
  ```


  ```bash
  python main.py path/to/your_file.py
  ```


  ```bash
  python main.py file1.py file2.py
  ```


  ```bash
  python main.py your_file.py --output analysis_results.txt
  ```


  ```bash
  python main.py your_file.py --model gpt-3.5
  ```


  ```bash
  python main.py your_file.py --api-key your_grok_api_key --base-url https://api.custom-url.com
  ```


  For example:
  ```bash
  python main.py nonexistent_file.py
  ```



  For sample files, check out the `examples/` directory in this repository. It contains test files that you can use to run the tool and see how it works.


  ```bash
  python main.py examples/test_code.py
  ```




  You can now provide multiple files and directories as input for complexity analysis. The tool will recursively process directories and analyze all relevant files within them.


  The tool now properly exits with a status code based on success or failure:
  - Exit code `0` for successful processing.
  - Exit code `1` for errors such as missing files, invalid inputs, or missing API keys.



  [Demo Video](https://github.com/user-attachments/assets/f4ddfe70-82d3-460e-bab7-fa0fe5c8121c)



  This project is licensed under the MIT License. See the [LICENSE](https://github.com/MadhurSaluja/Release-0.1/blob/main/LICENSE) file for details.


pkgId: 3bccd5453751cebf1aaeec144a2761f765166263a04c1dffd6704940969dd0cb
name: python-code-diff-review
arch: src
version: 1.5.4
epoch: 0
release: 1
summary: Review your code diff.
url: https://pypi.org/project/code-diff-review/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-diff-review-1.5.4-1.src.rpm
checksum_type: sha256
description:
  **Code Diff Review** is a tool to help developers review their code differences by integrating with GitHub and an external API using OpenAI. It generates automated issues and publishes code analysis reports.



  - Generate GitHub issues for code diffs
  - Integrate with an external API for code analysis
  - Publish detailed reports including commit messages, code diffs, and ACID analysis



  You can install the package using pip:

  ```sh
  pip install code-diff-review
  ```



  * Python 3.6+
  * `cururo`
  * `PyGithub`
  * `requests`





  After installation, you can use the `code-diff-review` command-line tool.



  ```sh
  code-diff-review --openai-key <OPENAI_API_KEY> --assistant-id <OPENAI_ASSISTANT_ID> --token <GH_TOKEN> --repo <REPO> --message <COMMIT_MESSAGE> --gh-before <GH_BEFORE_SHA> --sha <COMMIT_SHA> --branch <BRANCH> --webhook <WEBHOOK_URL> --websecret <WEBSECRET_SECRET>
  ```



  - `--openai-key`: OpenAI API key (default: environment variable `OPENAI_API_KEY`)
  - `--assistant-id`: OpenAI assistant ID (default: environment variable `OPENAI_ASSISTANT_ID`)
  - `--token`: GitHub token (default: environment variable `GH_TOKEN`)
  - `--repo`: Repository name (default: environment variable `REPO`)
  - `--branch`: Branch of work (default: environment variable `BRANCH`)
  - `--gh-before`: GitHub before SHA (default: environment variable `GH_BEFORE`)
  - `--sha`: Commit SHA (default: environment variable `SHA`)
  - `--message`: Commit message (default: environment variable `MESSAGE`)
  - `--webhook`: Webhook URL (default: environment variable `WEBHOOK`)
  - `--websecret`: Webhook secret (default: environment variable `WEBSECRET`)




  1. **Prepare the environment**: Ensure all required environment variables are set or provide them directly as arguments.

  2. **Generate a Git diff**: The script will automatically generate a Git diff between the provided SHAs.

  3. **Analyze the diff with OpenAI**: The script uses OpenAI to analyze the commit message and diff.

  4. **Publish the results**: The script publishes the results as a GitHub issue and to a specified webhook.



  Below is a step-by-step example of how you might use the `code-diff-review` tool in a real scenario.

  1. **Set environment variables** (optional):

      ```sh
      export OPENAI_API_KEY=your_openai_key
      export OPENAI_ASSISTANT_ID=your_assistant_id
      export GH_TOKEN=your_github_token
      export REPO=your_repo
      export MESSAGE="Initial commit"
      export GH_BEFORE=abc123
      export SHA=def456
      export BRANCH=branch
      export WEBHOOK=https://your.webhook.url
      export WEBSECRET=your_webhook_secret
      ```

  2. **Run the tool**:

      ```sh
      code-diff-review
      ```

      Alternatively, you can pass arguments directly:

      ```sh
      code-diff-review \
          --openai-key your_openai_key \
          --assistant-id your_assistant_id \
          --token your_github_token \
          --repo your_repo \
          --message "Initial commit" \
          --gh-before abc123 \
          --sha def456 \
          --branch your_work_branch \
          --webhook https://your.webhook.url \
          --websecret your_webhook_secret
      ```

  3. **Review the output**: The tool will create a GitHub issue with the analysis results and send the same information to the specified webhook.



  To contribute to this project, follow these steps:

  1. Clone the repository
  2. Create a virtual environment: `python -m venv venv`
  3. Activate the virtual environment:
     - On Windows: `venv\Scripts\activate`
     - On macOS/Linux: `source venv/bin/activate`
  4. Install the dependencies: `pip install -r requirements.txt`
  5. Make your changes and run the tests.



  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.



  Agustin Rios - [arios6@uc.cl](mailto:arios6@uc.cl)



  See the [CHANGELOG.md](CHANGELOG.md) file for details on changes in each version.


pkgId: e9b60fde7f2ab867e7377b835ac403515142aca06dfb0964efe6c9e3effcca6e
name: python-code-embedder
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Embed python code from script to markdown
url: https://pypi.org/project/code-embedder/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-embedder-1.0.2-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  <img src="assets/front.png" alt="Image" />


  Seamlessly update code snippets in your **README** files! 🔄📝🚀

  [Description](#-description) • [How it works](#-how-it-works) • [Setup - Github Action](#-setup---github-action) • [Setup - Pre-commit Hook](#-setup---pre-commit-hook) • [Examples](#-examples) • [Contributing](#-contributing) • [Development](#️-development)
  </div>




  **Code Embedder** is a **GitHub Action** and a **pre-commit hook** that automatically updates code snippets in your markdown (`README`) files. It finds code blocks in your `README` that reference specific scripts, then replaces these blocks with the current content of those scripts. This keeps your documentation in sync with your code.


  - 🔄 **Automatic synchronization**: Keep your `README` code examples up-to-date without manual intervention.
  - 🛠️ **Easy setup**: Simply add the action to your GitHub workflow / pre-commit hook and format your `README` code blocks.
  - 📝 **Section support**: Update only specific sections of the script in the `README`. This is **language agnostic**.
  - 🧩 **Object support**: Update only specific objects (functions, classes) in the `README`. *The latest version supports only 🐍 Python objects (other languages to be added soon).*


  By using **Code Embedder**, you can focus on writing and updating your actual code 💻, while letting the Code-Embedder take care of keeping your documentation current 📚🔄. This reduces the risk of outdated or incorrect code examples in your project documentation.



  The **Code Embedder** scans markdown files for special tags that specify which parts of your scripts to embed. When it finds these tags, it automatically updates the code blocks with the latest content from your source files. When used as a GitHub Action, any changes are automatically committed and pushed to your repository 🚀.


  In the `README` (or other markdown) file, the full script is marked with the following tag:
  ````md
   ```language:path/to/script
   ```
  ````

  In the `README` (or other markdown) file, the section of the script is marked with the following tag:
  ````md
   ```language:path/to/script:s:section_name
   ```
  ````
  > [!Note]
  >Notice that the `path/to/script` is followed by `s:` in the tag to indicate that the section `section_name` is being updated.

  You must also add the following comment tags in the script file `path/to/script`, where the section is located:
  ```
  [Comment sign] code_embedder:section_name start
  ...
  [Comment sign] code_embedder:section_name end
  ```
  The comment sign is the one that is used in the script file, e.g. `#` for Python, or `//` for JavaScript. For example, in python script you add `# code_embedder:A start` and `# code_embedder:A end` to new lines to mark the start and end of the section `A` you want to include in the `README`.

  The `section_name` must be unique in the file, otherwise the Code-Embedder will use the first section found.


  In the `README` (or other markdown) file, the object of the script is marked with the following tag:
  ````md
   ```language:path/to/script:o:object_name
   ```
  ````
  > [!Note]
  > Notice that the `path/to/script` is followed by `o:` in the tag to indicate that the object `object_name` is being updated.

  > [!Note]
  > The object name must match exactly the name of the object (function, class) in the script file, including the case (e.g. if class is `Person` then object name must be `Person`, not `person`). Currently, only 🐍 Python objects are supported.


  Use **Code Embedder** as a Github Action by adding the following to your `.github/workflows/code-embedder.yaml` file:

  ```yaml
  name: Code Embedder

  on: pull_request

  permissions:
    contents: write

  jobs:
    code_embedder:
      name: "Code embedder"
      runs-on: ubuntu-latest
      steps:
        - name: Checkout
          uses: actions/checkout@v4
          with:
            ref: ${{ github.event.pull_request.head.ref }}

        - name: Run code embedder
          uses: kvankova/code-embedder@v1.0.2
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  ```


  You can set up **Code Embedder** as a pre-commit hook using either:
  <ol type="A">
     <li>Installation via PyPI</li>
     <li>Direct repository reference in your <code>.pre-commit-config.yaml</code> file</li>
  </ol>


  Install the package:
  ```bash
  pip install code-embedder==v1.0.2
  ```

  Your `.pre-commit-config.yaml` file should look like this:
  ```yaml
  - repo: local
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Alternatively, you can reference the repository directly in your `.pre-commit-config.yaml` file:
  ```yaml
  - repo: https://github.com/kvankova/code-embedder
    rev: v1.0.2
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Command `code-embedder run` has the following options:

  | Option | Description |
  | ------ | ----------- |
  | `--all-files` | Process all files in the repository. In pre-commit hook, it by default checks only the changed files. |





  Let's say you have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Embedding successful")
  ```

  Once code-embedder runs, the code block sections are filled with the content of the script located at `main.py` and updated in the `README` file.

  ````md


  This is a readme.

  ```python:main.py
  print("Embedding successful")
  ```
  ````
  With any changes to `main.py`, the code block section is updated in the `README` file with the next code-embedder run.



  Now we have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py:s:A
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Hello, world!")


  print("Embedding successful")

  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the section `A` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  ```python:main.py:s:A
  print("Embedding successful")
  ```
  ````

  With any changes to the section `A` in `main.py`, the code block section is updated in the `README` file with the next code-embedder run.


  The tag used for object update follows the same convention as the tag for section update with the following changes:
  - use `o:` instead of `s:`
  - use `object_name`

  > [!Note]
  > The `object_name` must match exactly the name of the object (function, class) in the script file, including the case. If you define class `Person` in the script, you must use `Person` as the object name in the `README`, not lowercase `person`.

  For example, let's say we have the following `README` file:
  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  ```
  ````

  The `main.py` file contains the following code:
  ```python
  ...
  def print_hello():
      print("Hello, world!")
  ...

  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ...
  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the function `print_hello` and class `Person` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  def print_hello():
      print("Hello, world!")
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ```
  ````

  With any changes to the function `print_hello` or class `Person` in `main.py`, the code block sections are updated in the `README` file with the next code-embedder run.


  We welcome contributions to improve this package!
  - If you have an idea for a **new feature** ✨, open a [new feature request](https://github.com/kvankova/code-embedder/issues/new?labels=enhancement&template=feature_request.yaml) on GitHub.
  - If you spot a **bug** 🐛, open a [new issue](https://github.com/kvankova/code-embedder/issues/new/choose) on GitHub.
  - If you want to **contribute to the code**, please pick an issue that is not assigned to anyone and comment on it, so that we know you are working on it.


  1. Fork this project
  1. Install [poetry](https://python-poetry.org/docs/#installation)
  1. Install the dependencies by using the following command:
      ```bash
      poetry install --with dev
      ```
  1. Make changes to the codebase and run the tests to make sure everything works as expected. ✅
      ```bash
      poetry run pytest
      ```
  1. Commit your changes, push them to the repository 🚀, and open a new pull request.


pkgId: 636f8998ff3cd66505877179f4c8ac2a08c691c0f8db3edc867f97dbe558f759
name: python-code-embedder
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Embed python code from script to markdown
url: https://pypi.org/project/code-embedder/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-embedder-1.1.0-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  <img src="assets/front.png" alt="Image" />


  Seamlessly update code snippets in your **README** files! 🔄📝🚀

  [Description](#-description) • [How it works](#-how-it-works) • [Setup - Github Action](#-setup---github-action) • [Setup - Pre-commit Hook](#-setup---pre-commit-hook) • [Examples](#-examples) • [Contributing](#-contributing) • [Development](#️-development)
  </div>




  **Code Embedder** is a **GitHub Action** and a **pre-commit hook** that automatically updates code snippets in your markdown (`README`) files. It finds code blocks in your `README` that reference specific scripts, then replaces these blocks with the current content of those scripts. This keeps your documentation in sync with your code.


  - 🔄 **Automatic synchronization**: Keep your `README` code examples up-to-date without manual intervention.
  - 🛠️ **Easy setup**: Simply add the action to your GitHub workflow / pre-commit hook and format your `README` code blocks.
  - 📝 **Section support**: Update only specific sections of the script in the `README`. This is **language agnostic**.
  - 🧩 **Object support**: Update only specific objects (functions, classes) in the `README`. *The latest version supports only 🐍 Python objects (other languages to be added soon).*


  By using **Code Embedder**, you can focus on writing and updating your actual code 💻, while letting the Code-Embedder take care of keeping your documentation current 📚🔄. This reduces the risk of outdated or incorrect code examples in your project documentation.



  The **Code Embedder** scans markdown files for special tags that specify which parts of your scripts to embed. When it finds these tags, it automatically updates the code blocks with the latest content from your source files. When used as a GitHub Action, any changes are automatically committed and pushed to your repository 🚀.


  In the `README` (or other markdown) file, the full script is marked with the following tag:
  ````md
   ```language:path/to/script
   ```
  ````

  In the `README` (or other markdown) file, the section of the script is marked with the following tag:
  ````md
   ```language:path/to/script:s:section_name
   ```
  ````
  > [!Note]
  >Notice that the `path/to/script` is followed by `s:` in the tag to indicate that the section `section_name` is being updated.

  You must also add the following comment tags in the script file `path/to/script`, where the section is located:
  ```
  [Comment sign] code_embedder:section_name start
  ...
  [Comment sign] code_embedder:section_name end
  ```
  The comment sign is the one that is used in the script file, e.g. `#` for Python, or `//` for JavaScript. For example, in python script you add `# code_embedder:A start` and `# code_embedder:A end` to new lines to mark the start and end of the section `A` you want to include in the `README`.

  The `section_name` must be unique in the file, otherwise the Code-Embedder will use the first section found.


  In the `README` (or other markdown) file, the object of the script is marked with the following tag:
  ````md
   ```language:path/to/script:o:object_name
   ```
  ````
  > [!Note]
  > Notice that the `path/to/script` is followed by `o:` in the tag to indicate that the object `object_name` is being updated.

  > [!Note]
  > The object name must match exactly the name of the object (function, class) in the script file, including the case (e.g. if class is `Person` then object name must be `Person`, not `person`). Currently, only 🐍 Python objects are supported.


  Use **Code Embedder** as a Github Action by adding the following to your `.github/workflows/code-embedder.yaml` file:

  ```yaml
  name: Code Embedder

  on: pull_request

  permissions:
    contents: write

  jobs:
    code_embedder:
      name: "Code embedder"
      runs-on: ubuntu-latest
      steps:
        - name: Checkout
          uses: actions/checkout@v4
          with:
            ref: ${{ github.event.pull_request.head.ref }}

        - name: Run code embedder
          uses: kvankova/code-embedder@v1.1.0
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  ```


  You can set up **Code Embedder** as a pre-commit hook using either:
  <ol type="A">
     <li>Installation via PyPI</li>
     <li>Direct repository reference in your <code>.pre-commit-config.yaml</code> file</li>
  </ol>


  Install the package:
  ```bash
  pip install code-embedder==v1.1.0
  ```

  Your `.pre-commit-config.yaml` file should look like this:
  ```yaml
  - repo: local
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Alternatively, you can reference the repository directly in your `.pre-commit-config.yaml` file:
  ```yaml
  - repo: https://github.com/kvankova/code-embedder
    rev: v1.1.0
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Command `code-embedder run` has the following options:

  | Option | Description |
  | ------ | ----------- |
  | `--all-files` | Process all files in the repository. In pre-commit hook, it by default checks only the changed files. |





  Let's say you have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Embedding successful")
  ```

  Once code-embedder runs, the code block sections are filled with the content of the script located at `main.py` and updated in the `README` file.

  ````md


  This is a readme.

  ```python:main.py
  print("Embedding successful")
  ```
  ````
  With any changes to `main.py`, the code block section is updated in the `README` file with the next code-embedder run.



  Now we have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py:s:A
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Hello, world!")


  print("Embedding successful")

  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the section `A` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  ```python:main.py:s:A
  print("Embedding successful")
  ```
  ````

  With any changes to the section `A` in `main.py`, the code block section is updated in the `README` file with the next code-embedder run.


  The tag used for object update follows the same convention as the tag for section update with the following changes:
  - use `o:` instead of `s:`
  - use `object_name`

  > [!Note]
  > The `object_name` must match exactly the name of the object (function, class) in the script file, including the case. If you define class `Person` in the script, you must use `Person` as the object name in the `README`, not lowercase `person`.

  For example, let's say we have the following `README` file:
  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  ```
  ````

  The `main.py` file contains the following code:
  ```python
  ...
  def print_hello():
      print("Hello, world!")
  ...

  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ...
  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the function `print_hello` and class `Person` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  def print_hello():
      print("Hello, world!")
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ```
  ````

  With any changes to the function `print_hello` or class `Person` in `main.py`, the code block sections are updated in the `README` file with the next code-embedder run.


  We welcome contributions to improve this package!
  - If you have an idea for a **new feature** ✨, open a [new feature request](https://github.com/kvankova/code-embedder/issues/new?labels=enhancement&template=feature_request.yaml) on GitHub.
  - If you spot a **bug** 🐛, open a [new issue](https://github.com/kvankova/code-embedder/issues/new/choose) on GitHub.
  - If you want to **contribute to the code**, please pick an issue that is not assigned to anyone and comment on it, so that we know you are working on it.


  1. Fork this project
  1. Install [poetry](https://python-poetry.org/docs/#installation)
  1. Install the dependencies by using the following command:
      ```bash
      poetry install --with dev
      ```
  1. Make changes to the codebase and run the tests to make sure everything works as expected. ✅
      ```bash
      poetry run pytest
      ```
  1. Commit your changes, push them to the repository 🚀, and open a new pull request.


pkgId: 7dd6397aa46c66da744f7a55dc703f7026b6197c32c1b3fa5692112658ff6ab9
name: python-code-embedder
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: Embed python code from script to markdown
url: https://pypi.org/project/code-embedder/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-embedder-1.1.1-1.src.rpm
checksum_type: sha256
description:
  <div align="center">

  <img src="assets/front.png" alt="Image" />


  Seamlessly update code snippets in your **README** files! 🔄📝🚀

  [Description](#-description) • [How it works](#-how-it-works) • [Setup - Github Action](#-setup---github-action) • [Setup - Pre-commit Hook](#-setup---pre-commit-hook) • [Examples](#-examples) • [Contributing](#-contributing) • [Development](#️-development)
  </div>




  **Code Embedder** is a **GitHub Action** and a **pre-commit hook** that automatically updates code snippets in your markdown (`README`) files. It finds code blocks in your `README` that reference specific scripts, then replaces these blocks with the current content of those scripts. This keeps your documentation in sync with your code.


  - 🔄 **Automatic synchronization**: Keep your `README` code examples up-to-date without manual intervention.
  - 🛠️ **Easy setup**: Simply add the action to your GitHub workflow / pre-commit hook and format your `README` code blocks.
  - 📝 **Section support**: Update only specific sections of the script in the `README`. This is **language agnostic**.
  - 🧩 **Object support**: Update only specific objects (functions, classes) in the `README`. *The latest version supports only 🐍 Python objects (other languages to be added soon).*


  By using **Code Embedder**, you can focus on writing and updating your actual code 💻, while letting the Code-Embedder take care of keeping your documentation current 📚🔄. This reduces the risk of outdated or incorrect code examples in your project documentation.



  The **Code Embedder** scans markdown files for special tags that specify which parts of your scripts to embed. When it finds these tags, it automatically updates the code blocks with the latest content from your source files. When used as a GitHub Action, any changes are automatically committed and pushed to your repository 🚀.


  In the `README` (or other markdown) file, the full script is marked with the following tag:
  ````md
   ```language:path/to/script
   ```
  ````

  In the `README` (or other markdown) file, the section of the script is marked with the following tag:
  ````md
   ```language:path/to/script:s:section_name
   ```
  ````
  > [!Note]
  >Notice that the `path/to/script` is followed by `s:` in the tag to indicate that the section `section_name` is being updated.

  You must also add the following comment tags in the script file `path/to/script`, where the section is located:
  ```
  [Comment sign] code_embedder:section_name start
  ...
  [Comment sign] code_embedder:section_name end
  ```
  The comment sign is the one that is used in the script file, e.g. `#` for Python, or `//` for JavaScript. For example, in python script you add `# code_embedder:A start` and `# code_embedder:A end` to new lines to mark the start and end of the section `A` you want to include in the `README`.

  The `section_name` must be unique in the file, otherwise the Code-Embedder will use the first section found.


  In the `README` (or other markdown) file, the object of the script is marked with the following tag:
  ````md
   ```language:path/to/script:o:object_name
   ```
  ````
  > [!Note]
  > Notice that the `path/to/script` is followed by `o:` in the tag to indicate that the object `object_name` is being updated.

  > [!Note]
  > The object name must match exactly the name of the object (function, class) in the script file, including the case (e.g. if class is `Person` then object name must be `Person`, not `person`). Currently, only 🐍 Python objects are supported.


  Use **Code Embedder** as a Github Action by adding the following to your `.github/workflows/code-embedder.yaml` file:

  ```yaml
  name: Code Embedder

  on: pull_request

  permissions:
    contents: write

  jobs:
    code_embedder:
      name: "Code embedder"
      runs-on: ubuntu-latest
      steps:
        - name: Checkout
          uses: actions/checkout@v4
          with:
            ref: ${{ github.event.pull_request.head.ref }}

        - name: Run code embedder
          uses: kvankova/code-embedder@v1.1.1
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  ```


  You can set up **Code Embedder** as a pre-commit hook using either:
  <ol type="A">
     <li>Installation via PyPI</li>
     <li>Direct repository reference in your <code>.pre-commit-config.yaml</code> file</li>
  </ol>


  Install the package:
  ```bash
  pip install code-embedder==v1.1.1
  ```

  Your `.pre-commit-config.yaml` file should look like this:
  ```yaml
  - repo: local
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Alternatively, you can reference the repository directly in your `.pre-commit-config.yaml` file:
  ```yaml
  - repo: https://github.com/kvankova/code-embedder
    rev: v1.1.1
    hooks:
      - id: code-embedder
        name: Code embedder
        entry: code-embedder run
        language: system
  ```


  Command `code-embedder run` has the following options:

  | Option | Description |
  | ------ | ----------- |
  | `--all-files` | Process all files in the repository. In pre-commit hook, it by default checks only the changed files. |





  Let's say you have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Embedding successful")
  ```

  Once code-embedder runs, the code block sections are filled with the content of the script located at `main.py` and updated in the `README` file.

  ````md


  This is a readme.

  ```python:main.py
  print("Embedding successful")
  ```
  ````
  With any changes to `main.py`, the code block section is updated in the `README` file with the next code-embedder run.



  Now we have the following `README` file:
  ````md


  This is a readme.

  ```python:main.py:s:A
  ```
  ````
  The `main.py` file contains the following code:
  ```python
  print("Hello, world!")


  print("Embedding successful")

  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the section `A` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  ```python:main.py:s:A
  print("Embedding successful")
  ```
  ````

  With any changes to the section `A` in `main.py`, the code block section is updated in the `README` file with the next code-embedder run.


  The tag used for object update follows the same convention as the tag for section update with the following changes:
  - use `o:` instead of `s:`
  - use `object_name`

  > [!Note]
  > The `object_name` must match exactly the name of the object (function, class) in the script file, including the case. If you define class `Person` in the script, you must use `Person` as the object name in the `README`, not lowercase `person`.

  For example, let's say we have the following `README` file:
  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  ```
  ````

  The `main.py` file contains the following code:
  ```python
  ...
  def print_hello():
      print("Hello, world!")
  ...

  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ...
  ```

  Once code-embedder runs, the code block section will be updated in the `README` file with the content of the function `print_hello` and class `Person` from the script located at `main.py` (in case of using it as a Github Action, the changes are then pushed to the repository 🚀).

  ````md


  This is a readme.

  Function `print_hello` is defined as follows:
  ```python:main.py:o:print_hello
  def print_hello():
      print("Hello, world!")
  ```

  Class `Person` is defined as follows:
  ```python:main.py:o:Person
  class Person:
      def __init__(self, name):
          self.name = name
      def say_hello(self):
          print(f"Hello, {self.name}!")
  ```
  ````

  With any changes to the function `print_hello` or class `Person` in `main.py`, the code block sections are updated in the `README` file with the next code-embedder run.


  We welcome contributions to improve this package!
  - If you have an idea for a **new feature** ✨, open a [new feature request](https://github.com/kvankova/code-embedder/issues/new?labels=enhancement&template=feature_request.yaml) on GitHub.
  - If you spot a **bug** 🐛, open a [new issue](https://github.com/kvankova/code-embedder/issues/new/choose) on GitHub.
  - If you want to **contribute to the code**, please pick an issue that is not assigned to anyone and comment on it, so that we know you are working on it.


  1. Fork this project
  1. Install [poetry](https://python-poetry.org/docs/#installation)
  1. Install the dependencies by using the following command:
      ```bash
      poetry install --with dev
      ```
  1. Make changes to the codebase and run the tests to make sure everything works as expected. ✅
      ```bash
      poetry run pytest
      ```
  1. Commit your changes, push them to the repository 🚀, and open a new pull request.


pkgId: 4c75f1e5cc149798d72a40538c8d65ec2dc2caa38c294f7d785175b07d881c78
name: python-code-formatter-advisor
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: A tool to analyze code and provide formatting improvement suggestions
url: https://github.com/Elisassa/code-formatter-advisor
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-formatter-advisor-0.1.0-1.src.rpm
checksum_type: sha256
description:
  Code-Formatter-Advisor is a command-line tool that leverages GroqCloud API to analyze code and provide formatting improvement suggestions. It offers a streamlined interface for specifying input files, customizing outputs, and enhancing code readability and consistency. The tool supports multiple programming languages and integrates seamlessly into your workflow by delivering suggestions directly in the terminal or saving them to a file.



  - Provides code formatting suggestions based on best practices.
  - Supports multiple programming languages.
  - Easy-to-use command-line interface.
  - Ability to output suggestions to a file or display them in the terminal.



  1. Clone the repository:
      ```bash
      git clone https://github.com/Elisassa/Code-Formatter-Advisor.git
      cd Code-Formatter-Advisor
      ```

  2. Create a virtual environment (optional but recommended):
      ```bash
      python -m venv venv
      source venv/bin/activate # On Windows use `venv\Scripts\activate`
      ```

  3. Install the required dependencies:
      ```bash
      pip install -r requirements.txt
      ```





  - `--output` or `-o`: Specify the output file name for the suggestions.
  - `--version` or `-v`: Display the version of the tool.
  - `files`: The code files to be analyzed (one or more).



  1. Analyze a single file and display suggestions in the terminal:
      ```bash
      python main.py test.py
      ```

  2. Analyze multiple files and save suggestions to an output file:
      ```bash
      python main.py test1.py test2.py --output suggestions.txt
      ```

  3. Check the version of the tool:
      ```bash
      python main.py --version
      ```



  The **Code-Formatter-Advisor** analyzes your code and provides actionable formatting suggestions to improve readability and consistency. Below is a demonstration of how the tool works:



  Below is an example of code before using Code-Formatter-Advisor. Notice the issues such as inconsistent indentation, missing type hints, and lack of descriptive comments.

  ![image](https://github.com/user-attachments/assets/668a2687-f656-45ff-9df1-680b10d19c03)




  After running the code through Code-Formatter-Advisor, the tool suggests various improvements such as:

  - **Consistent Indentation**: Standardizes indentation to 4 spaces for better readability.
  - **Removal of Extra Spaces**: Removes unnecessary spaces around function arguments, colons, and assignment operators.
  - **Descriptive Function Names**: Renames functions to be more descriptive, like changing `add_numbers` to `sum_numbers`.
  - **Addition of Docstrings**: Adds docstrings to describe the purpose and usage of functions, making the code self-documenting.
  - **Type Hints**: Adds type hints to function arguments and return values to clarify the expected input and output.

  ![Formatted Code Suggestions](https://github.com/user-attachments/assets/4c8b24ea-668a-4461-8cd4-16278cbfeef0)







  1. **Initialization**: The project was initialized by setting up a basic Python environment using `venv` to manage dependencies.

  2. **Dependencies**: Required libraries were defined and installed via a `requirements.txt` file, including `argparse` for command-line argument parsing, `dotenv` for environment variable management, and others for formatting analysis.

  3. **Development**:
     - The main logic is implemented in `main.py`, which handles reading files, interacting with the code formatting API, and processing user inputs.
     - `argparse` is used to handle command-line arguments, allowing users to specify files, output locations, and other options.
     - A custom API client (`Groq`) was integrated to analyze code and provide formatting suggestions.


pkgId: 0e8ca10162c8c3a3a2232aec77590fc445ab23d9cb2b8bbfac021e4dd008df74
name: python-code-guardian
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: Code-Guardian by TGSC
url: https://github.com/The-Swarm-Corporation/CodeGuardian
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-guardian-0.1.4-1.src.rpm
checksum_type: sha256
description:
  **Generate tests with swarms of agents**

  [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/kyegomezb)


  **CodeGuardian** is an intelligent agent designed to automate the generation of production-grade unit tests for your Python code. It not only creates and runs these tests but also monitors them in real-time, providing you with comprehensive summaries of your code health. With CodeGuardian, you can enhance code reliability, maintainability, and accelerate your development workflow.



  - **Automated Test Generation**: Automatically generate unit tests for your existing Python codebase.
  - **Test Execution**: Run generated tests seamlessly and view results instantly.
  - **Real-Time Monitoring**: Watch tests in real-time to observe code behavior and performance.
  - **Code Health Summaries**: Receive detailed reports on test coverage, code quality, and potential issues.
  - **Easy Integration**: Integrate effortlessly with existing projects and CI/CD pipelines.
  - **Customizable Configurations**: Tailor settings to match your project requirements.




  - **Python 3.7** or higher
  - **pip** package manager



  ```bash
  pip3 install -U code-guardian
  ```



  ```python
  import os

  from dotenv import load_dotenv
  from swarms import Agent, OpenAIChat

  from code_guardian.main import CodeGuardian

  load_dotenv()


  api_key = os.getenv("OPENAI_API_KEY")


  model = OpenAIChat(
      openai_api_key=api_key,
      model_name="gpt-4o-mini",
      temperature=0.1,
      max_tokens=2000,
  )


  agent = Agent(
      agent_name="Unit-Test-Generator-Agent",  # Changed agent name
      system_prompt="Generate unit tests for the provided classes using pytest.",  # Updated system prompt
      llm=model,
      max_loops=1,
      autosave=True,
      dashboard=False,
      verbose=True,
      dynamic_temperature_enabled=True,
      saved_state_path="unit_test_agent.json",  # Updated saved state path
      user_name="swarms_corp",
      retry_attempts=1,
      context_length=200000,
      return_step_meta=False,
      
  )


  classes_to_test = [CodeGuardian]


  guardian = CodeGuardian(
      classes=classes_to_test, # classes to test
      agent=agent, # agent to use
      dir_path="tests", # directory to save tests
      package_name="code-guardian", # package name
      module_name="code_guardian.main", # module name
  )
  guardian.run()
  ```




  - **test_directory**: Directory where tests are stored.
  - **source_directory**: Directory containing your source code.
  - **exclude_patterns**: Files or directories to exclude.
  - **report_format**: Format of the code health report (`html`, `json`, `xml`).
  - **watch**: Settings for real-time monitoring.




  - **Multi-language Support**: Extend functionality to other programming languages.
  - **Advanced Static Analysis**: Integrate deeper code analysis tools.
  - **IDE Plugins**: Develop plugins for popular IDEs like VSCode and PyCharm.
  - **Enhanced Reporting**: Add more detailed metrics and visualizations.



  We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to get started.



  CodeGuardian is licensed under the [MIT License](LICENSE).



  - Inspired by the need for robust automated testing tools.
  - Thanks to the open-source community for their invaluable contributions.


pkgId: 53d2784947fb6b9f83ea916734735c533402d6f37414e80f9149f6893a2cf630
name: python-code-iq
arch: src
version: 1.0.0
epoch: 0
release: 1
url: https://github.com/youzarsiph/code-iq
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-iq-1.0.0-1.src.rpm
checksum_type: sha256
summary:
  CodeIQ is an advanced AI-powered coding assistant designed to enhance developer productivity by providing intelligent code suggestions and natural language interactions. Built on Hugging Face's StarCoder 2 (15B) and StarChat 2 15B.

description:
  ![CI](https://github.com/youzarsiph/code-iq/actions/workflows/ci.yml/badge.svg)
  ![CD](https://github.com/youzarsiph/code-iq/actions/workflows/cd.yml/badge.svg)
  ![Black](https://github.com/youzarsiph/code-iq/actions/workflows/black.yml/badge.svg)
  ![Ruff](https://github.com/youzarsiph/code-iq/actions/workflows/ruff.yml/badge.svg)
  [![PyPI - Version](https://img.shields.io/pypi/v/code-iq?logo=pypi&logoColor=white)](https://pypi.org/project/code-iq/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/code-iq?logo=python&logoColor=white)](https://pypi.org/project/code-iq/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/code-iq?logo=pypi&logoColor=white)](https://pypi.org/project/code-iq/)
  [![PyPI - Format](https://img.shields.io/pypi/format/code-iq?logo=pypi&logoColor=white)](https://pypi.org/project/code-iq/)
  [![PyPI - Implementation](https://img.shields.io/pypi/implementation/code-iq?logo=pypi&logoColor=white)](https://pypi.org/project/code-iq/)
  [![PyPI - License](https://img.shields.io/pypi/l/code-iq?logo=pypi&logoColor=white)](https://pypi.org/project/code-iq/)



  CodeIQ is an advanced AI-powered command-line interface (CLI) tool designed to enhance coding efficiency and productivity. Utilizing the sophisticated capabilities of Qwen2.5-Coder-32B-Instruct, CodeIQ offers intelligent code completions, error detection, and automated coding functionalities. This empowers developers to streamline their workflows with precision and ease, making it an invaluable resource for professionals at all levels.



  - **Contextual Code Completions**: Receive accurate, contextually relevant code suggestions to accelerate development with minimal errors.
  - **Natural Language Interaction**: Engage with CodeIQ using natural language for detailed explanations, debugging tips, and guidance.
  - **Multi-Language Support**: Seamlessly write and execute code in over 100 programming languages with CodeIQ's comprehensive integration.
  - **Personalized Learning**: Continuously improve recommendations based on user interactions, providing personalized and immediate insights.





  - **Python**: CodeIQ requires Python 3.10 or higher. Ensure you have the correct version installed.
  - **Hugging Face Token**: Create an account on [Hugging Face](https://huggingface.co/) and obtain an API token.



  To install CodeIQ, execute the following command:

  ```bash
  pip install code-iq
  ```

  Ensure that your Hugging Face token is set as an environment variable:

  - **Unix-based Systems (Linux, macOS):**

    ```bash
    export HF_TOKEN=hf_your_token_here
    ```

  - **Windows (PowerShell):**

    ```powershell
    $env:HF_TOKEN = "hf_your_token_here"
    ```



  Launch CodeIQ with the following command:

  ```console
  code-iq [OPTIONS] COMMAND [ARGS]...
  ```



  - `--install-completion`: Install shell completion for CodeIQ.
  - `--show-completion`: Display the completion script for the current shell.
  - `--help`: Display this help message and exit.



  - `ai`: Utilize AI-driven functionalities to generate code, obtain explanations, and perform tasks.
  - `chat`: Enable real-time conversations for troubleshooting, guidance, and inquiries.
  - `complete`: Receive code completion suggestions based on context and best practices.
  - `document`: Assist in generating and formatting documentation.
  - `enhance`: Apply optimizations or improvements to code.
  - `review`: Conduct thorough code reviews for quality and adherence to standards.
  - `scan`: Identify vulnerabilities and potential issues within codebases.
  - `test`: Facilitate the creation and execution of tests.



  Leverage AI functionalities to generate code snippets, obtain suggestions, and perform tasks.

  **Examples:**

  ```bash
  code-iq ai "Generate a function to calculate the area of a circle"
  code-iq ai -c code.py "Explain the code"
  code-iq ai -o output.md "How to install HuggingFace Transformers?"
  ```

  **Usage:**

  ```console
  code-iq ai [OPTIONS] PROMPT
  ```

  **Arguments:**

  - `PROMPT`: The prompt or instruction for the AI. [required]

  **Options:**

  - `-c, --code FILENAME`: Include a code file in the prompt.
  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 2048]
  - `--help`: Display this help message and exit.



  Engage in real-time conversations for troubleshooting, guidance, or general inquiries.

  **Examples:**

  ```bash

  code-iq chat


  code-iq chat -e chat_history.json


  code-iq chat -h chat_history.json


  code-iq chat -h chat_history.json -e chat_history.json
  ```

  **Usage:**

  ```console
  code-iq chat [OPTIONS]
  ```

  **Options:**

  - `-e, --export FILENAME`: Export the chat history to this file.
  - `-h, --history FILENAME`: Import a previous chat history from this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 2048]
  - `--help`: Display this help message and exit.



  Receive suggestions to complete partially written code based on context and best practices.

  **Examples:**

  ```bash
  code-iq complete 'def hello_world():'
  code-iq complete -l python 'def hello_world():'
  code-iq complete -o code-completions.md 'def hello_world():'
  ```

  **Usage:**

  ```console
  code-iq complete [OPTIONS] CODE
  ```

  **Arguments:**

  - `CODE`: The code snippet for which to receive completions. [required]

  **Options:**

  - `-l, --lang TEXT`: Specify the programming language of the code snippet.
  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 128]
  - `--help`: Display this help message and exit.



  Generate and manage code documentation, including comments, README files, and technical documentation.

  **Examples:**

  ```bash
  code-iq document code.py
  code-iq document code.py -o code-docs.md
  ```

  **Usage:**

  ```console
  code-iq document [OPTIONS] CODE
  ```

  **Arguments:**

  - `CODE`: The code file for which to generate documentation. [required]

  **Options:**

  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 2048]
  - `--help`: Display this help message and exit.



  Apply improvements or optimizations to existing code, including refactoring and performance tuning.

  **Examples:**

  ```bash
  code-iq enhance code.py
  code-iq enhance code.py -o code-enhancements.md
  ```

  **Usage:**

  ```console
  code-iq enhance [OPTIONS] CODE
  ```

  **Arguments:**

  - `CODE`: The code file to enhance. [required]

  **Options:**

  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 2048]
  - `--help`: Display this help message and exit.



  Analyze code for potential issues and adherence to coding standards.

  **Examples:**

  ```bash
  code-iq review code.py
  code-iq review code.py -o code-review.md
  ```

  **Usage:**

  ```console
  code-iq review [OPTIONS] CODE
  ```

  **Arguments:**

  - `CODE`: The code file to review. [required]

  **Options:**

  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number of tokens in the response. [Default: 2048]
  - `--help`: Display this help message and exit.



  Identify vulnerabilities, bugs, or areas for improvement within codebases.

  **Examples:**

  ```bash
  code-iq scan code.py
  code-iq scan code.py -o code-scan.md
  ```

  **Usage:**

  ```console
  code-iq scan [OPTIONS] CODE
  ```

  **Arguments:**

  - `CODE`: The code file to scan. [required]

  **Options:**

  - `-o, --output FILENAME`: Write the response to this file.
  - `-t, --max-tokens INTEGER`: Limit the number


pkgId: db34273b720574bea9463868972a00b3d4f922d54b500e3e6e050eb8fad2d6b9
name: python-code-pilot-cli
arch: src
version: 0.2.1
epoch: 0
release: 1
summary: Your customizable codding assistant in your CLI
url: https://github.com/youzarsiph/code-pilot-cli
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-pilot-cli-0.2.1-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/ci.yml)
  [![CD](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/cd.yml/badge.svg)](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/cd.yml)
  [![Code Format](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/black.yml/badge.svg)](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/black.yml)
  [![Linter](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/ruff.yml/badge.svg)](https://github.com/youzarsiph/code-pilot-cli/actions/workflows/ruff.yml)
  [![PyPI - Version](https://img.shields.io/pypi/v/code-pilot-cli?logo=pypi&logoColor=white)](https://pypi.org/project/code-pilot-cli/)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/code-pilot-cli?logo=python&logoColor=white)](https://pypi.org/project/code-pilot-cli/)
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/code-pilot-cli?logo=pypi&logoColor=white)](https://pypi.org/project/code-pilot-cli/)
  [![PyPI - License](https://img.shields.io/pypi/l/code-pilot-cli?logo=pypi&logoColor=white)](https://pypi.org/project/code-pilot-cli/)



  The **CodePilot CLI** is a sophisticated command-line interface designed to empower developers by streamlining and automating essential coding tasks. Leveraging state-of-the-art AI models, CodePilot offers a comprehensive suite of features aimed at enhancing code quality, generating documentation, writing tests, conducting code reviews, and identifying security vulnerabilities.



  - **Streamlined Development**: Automate repetitive tasks to focus on more strategic work.
  - **Code Quality Enhancement**: Receive suggestions for code improvements and best practices.
  - **Documentation Generation**: Quickly generate comprehensive and accurate documentation.
  - **Automated Testing**: Save time by creating test cases with minimal effort.
  - **Security Scanning**: Detect potential vulnerabilities in your codebase.
  - **Real-time Chat**: Engage in real-time discussions with CodePilot for instant assistance.



  To gain a deeper understanding of CodePilot CLI's capabilities, we invite you to watch our [interactive demonstration video](https://youtu.be/XdwqzXIJ_qc) on YouTube.

  [![Interactive Demonstration of CodePilot CLI](https://img.youtube.com/vi/XdwqzXIJ_qc/maxresdefault.jpg)](https://youtu.be/XdwqzXIJ_qc)



  Installing the CodePilot CLI is straightforward. Use the following `pip` command to install the tool:

  ```bash
  pip install code-pilot-cli
  ```



  To authenticate and utilize the CLI effectively, set your Hugging Face token as an environment variable. You can obtain your token from [Hugging Face](https://huggingface.co/settings/tokens).



  ```bash
  export HF_TOKEN=hf_**********************************
  ```



  ```powershell
  $env:HF_TOKEN = "hf_**********************************"
  ```





  ```bash
  code-pilot [OPTIONS] COMMAND [ARGS]...
  ```



  - **`ai`**: Interact with CodePilot using natural language prompts.
  - **`chat`**: Engage in a real-time chat session with CodePilot.
  - **`completions`**: Generate code completions from provided snippets.
  - **`document`**: Automatically generate comprehensive documentation for code.
  - **`enhance`**: Improve code quality by aligning it with best practices.
  - **`review`**: Perform detailed code reviews to identify areas for enhancement.
  - **`scan`**: Detect security vulnerabilities within your code.
  - **`test`**: Automatically generate tests for your code.





  Interact with CodePilot using natural language prompts.

  **Usage:**

  ```bash
  code-pilot ai "Build an Expo to-do app using TypeScript and expo-router" -o response.md
  ```

  **Options:**

  - `-c, --code FILENAME`: Include a code file in your prompt.
  - `-o, --output FILENAME`: Save the response to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Initiate a chat session with CodePilot to receive real-time assistance.

  **Usage:**

  ```bash
  code-pilot chat -e chat_history.json -h chat_history.json
  ```

  **Options:**

  - `-e, --export FILENAME`: Export chat history to a file.
  - `-h, --history FILENAME`: Import chat history from a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Generate code completions from code snippets.

  **Usage:**

  ```bash
  code-pilot completions "fn say_hello(name: String) -> String:" -l rust -o code-completions.md
  ```

  **Options:**

  - `-c, --code TEXT`: Provide a code snippet.
  - `-f, --file FILENAME`: Read code from a file.
  - `-l, --lang TEXT`: Specify the programming language.
  - `-o, --output FILENAME`: Save the response to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Generate documentation for specified code files.

  **Usage:**

  ```bash
  code-pilot document src/lib.rs -o code-docs.md
  ```

  **Options:**

  - `-o, --output FILENAME`: Save the documentation to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Improve code quality by applying best practices.

  **Usage:**

  ```bash
  code-pilot enhance app/models.py -m meta-llama/Llama-3.2-3B-Instruct -o enhancements.md
  ```

  **Options:**

  - `-o, --output FILENAME`: Save the improvements to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Conduct a thorough code review to identify areas for improvement.

  **Usage:**

  ```bash
  code-pilot review code.py -m meta-llama/Llama-3.2-3B-Instruct -o code-review.md
  ```

  **Options:**

  - `-o, --output FILENAME`: Save the review to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Identify security vulnerabilities present in your code.

  **Usage:**

  ```bash
  code-pilot scan src/main.rs -m meta-llama/Llama-3.2-3B-Instruct -o code-scan.md
  ```

  **Options:**

  - `-o, --output FILENAME`: Save the results to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  Automatically generate tests for your code.

  **Usage:**

  ```bash
  code-pilot test App.tsx -m meta-llama/Llama-3.2-3B-Instruct
  ```

  **Options:**

  - `-o, --output FILENAME`: Save the generated tests to a file.
  - `-m, --model TEXT`: Specify the AI model to use.
  - `-t, --max-tokens INTEGER`: Set the maximum number of tokens in the response.



  We welcome contributions to the CodePilot CLI project. To get started, please refer to the [Contribution Guide](CONTRIBUTING.md).



  If you encounter any issues or have suggestions for improvements, please don't hesitate to reach out to us via our [GitHub Issues](https://github.com/youzarsiph/code-pilot-cli/issues).



  The CodePilot CLI is distributed under the [MIT License](LICENSE).


pkgId: aa26c03d8ba6282aed6a01086edefeabd26b3e740fbf881c404f1d1c5b6612df
name: python-code-size-analyzer-client-python
arch: src
version: 0.8.1
epoch: 0
release: 1
summary: FastAPI
url: https://pypi.org/project/code-size-analyzer-client-python/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code-size-analyzer-client-python-0.8.1-1.src.rpm
checksum_type: sha256
description:
      No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501


pkgId: 209e709ca83340ca803119742f72b14cd9eb0590bd96ecb98500f9b168aa5143
name: python-code2claude
arch: src
version: 0.3.0
epoch: 0
release: 1
url: https://github.com/ad3002/code2claude
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code2claude-0.3.0-1.src.rpm
checksum_type: sha256
summary:
  A Python tool that consolidates code from a repository into a unified format for AI-assisted analysis and manipulation.

description:
  A Python tool that consolidates code from a repository into a unified format for AI-assisted analysis and manipulation.
  Code Consolidator is a Python tool that traverses a code repository, extracts code from specified files, and consolidates it into a unified format. The consolidated code is optimized for AI-assisted analysis and manipulation, enabling seamless collaboration between humans and AI in understanding and working with the codebase.

  - **Traverse a repository**: Identifies relevant code files based on specified file extensions.
  - **Code extraction**: Extracts code from each file without any preprocessing.
  - **Code consolidation**: Consolidates the extracted code into a single, unified format (XML or raw).
  - **Metadata inclusion**: Includes file paths for context.
  - **Skip options**: Optionally skips test files and specified folders.
  - **Selective inclusion**: Filters files containing a specified string in the file path.

  From PyPI:
  ```bash
  pip install code2claude
  ```
  From source:
  1. Clone the repository:
     ```bash
     git clone https://github.com/ad3002/code2claude
     ```
  2. Navigate to the project directory:
     ```bash
     cd code2claude
     ```
  3. Install the required dependencies:
     ```bash
     pip install -r requirements.txt
     ```

  ```bash
  python code2claude.py -r /path/to/repo -o output.xml -f xml --skiptests --skipfolders folder1,folder2 --contain keyword -e .py .js
  ```
  - `-r/--repo_path`: Path to the code repository (required).
  - `-o/--output_file`: Path to the output file (default: `consolidated_code.code`).
  - `-f/--format`: Output format, either `xml` or `raw` (default: `xml`).
  - `--skiptests`: Skip test files that contain "test" in their name (default: `False`).
  - `-s/--skipfolders`: Comma-separated list of folders to skip (default: `False`).
  - `--contain`: Include files containing this string in the file path.
  - `-e/--extensions`: Space-separated list of file extensions to include (default: `.py`).

  ```bash
  python code2claude.py -r /path/to/repo -o consolidated_code.xml -f xml --skiptests True -s folder_to_skip --contain utils -e .py .java
  ```

  **XML Format:**
  ```xml
  <file>
     <path>/path/to/file.py</path>
     <content>
        
     </content>
  </file>
  ```
  **Raw Format:**
  ```plaintext



  ```

  ```xml
  <prompt>
     <consolidated_code>
        <instruction>Claude, please, see the attached file</instruction>
     </consolidated_code>
     <question>
     Your question or request goes here. For example:
     - Can you identify any potential performance issues in the code?
     - How can I refactor the code to improve readability and maintainability?
     - Are there any security vulnerabilities or best practices violations in the code?
     </question>
  </prompt>
  ```

  During code consolidation, the tool also gathers and displays statistics about the consolidated files. This includes:
  - **Number of Files**: The total number of files that were consolidated.
  - **Number of Lines**: The number of lines in each file and the total number of lines across all files.
  - **Number of Characters**: The total number of characters in the consolidated code.

  After running the command, the following information will be displayed:
  ```plaintext
  Consolidated 10 files:
      /path/to/file1.py: 120 lines
      /path/to/file2.py: 98 lines
      /path/to/file10.py: 150 lines
  Total lines: 1000
  Total chars: 25000
  ```
  - **Consolidated X files**: Indicates how many files were consolidated.
  - **[File path]: Y lines**: Shows the file path and the number of lines in that file.
  - **Total lines**: The total number of lines across all files.
  - **Total chars**: The total number of characters in the consolidated code.
  This statistics section provides insights into the size and structure of your project, which can be helpful for further code analysis and optimization.

  Remember, the specific details and format of the consolidated code may vary based on your project's needs and the programming language being used. The key is to provide a clear, organized, and well-documented representation of your codebase that facilitates effective analysis and collaboration between humans and AI.
  To process the consolidated code as a whole and provide effective analysis and manipulation, there are a few additional things that would be helpful:
  1. Code Structure and Organization:
     - Clearly indicate the boundaries between different code files or modules within the consolidated code. This can be done using comments, delimiters, or specific markers.
     - Include information about the file paths or module names to provide context about the code's organization.
     - Maintain a consistent indentation level throughout the consolidated code to ensure readability.
  2. Dependency and Import Statements:
     - If the code relies on external libraries or modules, include the necessary import statements at the beginning of the consolidated code.
     - If there are inter-dependencies between the code files, ensure that the order of the consolidated code reflects the proper dependency hierarchy.
  3. Documentation and Comments:
     - Include relevant comments and documentation within the code to provide explanations and context.
     - Use docstrings to describe the purpose, parameters, and return values of functions and classes.
     - Provide high-level comments to explain the overall structure and flow of the code.
  4. Test Cases and Examples:
     - If available, include test cases or example usage of the code within the consolidated format.
     - This helps in understanding how the code is intended to be used and what expected outcomes should be.
  5. Configuration and Environment:
     - If the code relies on specific configuration files or environment variables, include them or provide instructions on how to set them up.
     - Specify any required dependencies or libraries that need to be installed for the code to run successfully.
  6. Error Handling and Logging:
     - Include error handling and logging statements within the code to aid in debugging and understanding potential issues.
     - Provide information on how to interpret and resolve common errors or exceptions that may occur.
  7. Code Analysis Preferences:
     - If you have specific preferences or requirements for code analysis, such as focusing on certain aspects like performance, security, or style, mention them along with the consolidated code.
     - This helps me tailor the analysis and provide targeted insights based on your priorities.
  By incorporating these additional elements, you can provide a more comprehensive and context-rich representation of your codebase. It enables me to understand the code's structure, dependencies, and intended usage more effectively, leading to more accurate and valuable analysis and manipulation.

  Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

  This project is licensed under the [MIT License](LICENSE).


pkgId: e7562ddbb299e6efd3e4f4cd5f513ea45aa0ff9747507c32f2970360bd0db72d
name: python-code2flow
arch: src
version: 2.5.1
epoch: 0
release: 1
summary: Visualize your source code as DOT flowcharts
url: https://github.com/scottrogowski/code2flow
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code2flow-2.5.1-1.src.rpm
checksum_type: sha256
description:
  ```bash
  pip3 install code2flow
  ```
  If you don't have it already, you will also need to install graphviz. Installation instructions can be found [here](https://graphviz.org/download/).
  Additionally, depending on the language you want to parse, you may need to install additional dependencies:
  - JavaScript: [Acorn](https://www.npmjs.com/package/acorn)
  - Ruby: [Parser](https://github.com/whitequark/parser)
  - PHP: [PHP-Parser](https://github.com/nikic/PHP-Parser)
  - Python: No extra dependencies needed


pkgId: 98c000157a94d5924802e5a8cd4aa5581688850faff7affa0be9f10c2cf7787c
name: python-code2gist
arch: src
version: 0.0.18
epoch: 0
release: 1
description: We hope `code2gist` serves as a valuable tool in your development toolkit. Happy coding! 💻👨‍💻
url: https://pypi.org/project/code2gist/
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code2gist-0.0.18-1.src.rpm
checksum_type: sha256
summary:
  code2gist is a Python package that makes sharing your code easier than ever. Send code to ChatGPT-4's browser without going over the character limit.


pkgId: 9004a7032c5c87fc7de9825825ada569cf61bb3ab4b6e27e3a5a4ebc392d9c71
name: python-code2mermaid
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Python code converter for Mermaid chartflows
url: https://github.com/vilsonrodrigues/code2mermaid
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code2mermaid-0.2.0-1.src.rpm
checksum_type: sha256
description:
  **code2mermaid** is a python-only library to help convert Python code in [Mermaid](https://mermaid.js.org/) chartflows specifications. **code2mermaid** supports conditional and loops.



  Install the project

  > pip install code2mermaid

  To visualize flowcharts you can use



  * https://mermaid.live/



  > pip install mermaid-py

  ``` python
  import mermaid as md
  from mermaid.graph import Graph

  def plot_mermaid(mermaid_diagram):
      graph = Graph(
          title='chartflow',
          script=mermaid_diagram,
      )
      Mermaid(graph) # render the graph in notebook
  ```



  ``` python
  from code2mermaid import code_to_mermaid
  ```

  Mermaid supports five types of orientation:

  * TB - Top to bottom (default)
  * TD - Top-down/ same as top to bottom
  * BT - Bottom to top
  * RL - Right to left
  * LR - Left to right

  **code2mermaid** add a new node in graph each line in code

  Labels are supported using two forms of comments:

  * #> first form
  * #|second form|

  This makes it possible to keep standard code comments and easily add annotations to the graph.

  There are 7 types of nodes supported, each of them has its own style:

  * default - general code
  * conditional - when a node of the if/elif/else type is detected it is inserted into the graph
  * condition - the type of the condition, can be if, elif and else
  * functional - nodes that contain an F., useful for examples using pytorch-like
  * loop - node of the for/while type
  * parameter - extracts the parameters of the function and transforms them into nodes. `self` parameters and type annotations are ignored
  * terminal - nodes that start with `return` ideal to indicate the end of the graph

  Observation: add labels in loops or conditional nodes is not supported.



  ``` python
  code = """
  x = 1
  x += 2
  print(x)
  """
  mermaid_diagram = code_to_mermaid(code)
  ```

  [![](https://mermaid.ink/img/pako:eNqdlN1u2jAUx1_FMooisVA5CSnEU3dRPu521WoXW6bJcexizdiR46gwxINsb9Kn6ivMQNJAYRLaufLx-f2PP459NpDqgkEMPW-TKdCYUMJicDSxM98u2JL5GPg5qZgfXIp-IUaQXLLKP5eXRiyJWU-01GaXpTdLZ6PZ6CxRwz2yle1YtLd_sffaFMx09OQiLIViHTMf30dRegZVjGpVnOwzDdM4nZwfmBkrTkDOuX8KbTu3GW49L1Nc6me6IMaCx6mbVq4EP8KcJnwYjr6Bfn8F7kDY74Pv74NgMPh0mGGIJmOUs5Zo_YP8wx2IjvVttNMn0S0K84K2ROvv9O5WlX19-b16fflzyJIpzwMPdu0qmykqSVVNGQe7mxJWaEUk4EJK3OMJCykLKmv0T4Z7cRw348GzKOwCR-Xq46UE_yfntaKny_MxSkdX66XWZaskBU3zq5Wu9kvRrTufz4fT6dXqkhiyZC7HlfJO_e41FIyTWtrT6FutL0bbOh9FMwUDuHQnIqJwnWD_bzO4_88ZxG7YoBnM1NahpLb6Ya0oxNbULIBG108LiDmRlfPqsiCWTQV5codskZKor1ofuxBv4AriKBnfRBEaheM4QWGM4gCuIUbbAP7a8-gmbWw4RHHoiguZezLafD60rX332v4FA-x5zw?type=png)](https://mermaid.live/edit#pako:eNqdlN1u2jAUx1_FMooisVA5CSnEU3dRPu521WoXW6bJcexizdiR46gwxINsb9Kn6ivMQNJAYRLaufLx-f2PP459NpDqgkEMPW-TKdCYUMJicDSxM98u2JL5GPg5qZgfXIp-IUaQXLLKP5eXRiyJWU-01GaXpTdLZ6PZ6CxRwz2yle1YtLd_sffaFMx09OQiLIViHTMf30dRegZVjGpVnOwzDdM4nZwfmBkrTkDOuX8KbTu3GW49L1Nc6me6IMaCx6mbVq4EP8KcJnwYjr6Bfn8F7kDY74Pv74NgMPh0mGGIJmOUs5Zo_YP8wx2IjvVttNMn0S0K84K2ROvv9O5WlX19-b16fflzyJIpzwMPdu0qmykqSVVNGQe7mxJWaEUk4EJK3OMJCykLKmv0T4Z7cRw348GzKOwCR-Xq46UE_yfntaKny_MxSkdX66XWZaskBU3zq5Wu9kvRrTufz4fT6dXqkhiyZC7HlfJO_e41FIyTWtrT6FutL0bbOh9FMwUDuHQnIqJwnWD_bzO4_88ZxG7YoBnM1NahpLb6Ya0oxNbULIBG108LiDmRlfPqsiCWTQV5codskZKor1ofuxBv4AriKBnfRBEaheM4QWGM4gCuIUbbAP7a8-gmbWw4RHHoiguZezLafD60rX332v4FA-x5zw)



  ``` python
  code = """
  x = 1
  if x == 1:
      print(x)
  else:
      print("x is not equal to 1")
  """
  mermaid_diagram = code_to_mermaid(code)
  ```

  [![](https://mermaid.ink/img/pako:eNqdVNmK2zAU_RWhEAzBKV6S8VLah8ny1qcZ-tC6FNm-mog6UirLTNJg6G-0H1KY3-kPzC9UWbxlgVA96d57zl2kw93iRKSAQ9zvbyOOjodxpkLUcuyOoRawBCNERkxyMMxL0Y9EMhJnkBvn9JVkSyI3E5EJucvSmwUzb-adJTriHmGtGqy1P9ew90KmIBv05CI4YxwazNy_d5zgDJRDInja6TOwAzeYnA8MUrEOkFJqdEFlYx6vZb8fcZqJ52RBpEKPU-3m-gu-uikknm-Rz2gwWKN3yB4M0JfTIBoO3x88kIwsJ3ZHFaKyt5o-hYTlTHCdoTyNNxnieOzcjVLvOoK6I39se3GFqBjbXRFGkW7z0GdZnkKaJM6IEjv160Yrezen_j6uXl9-rV9ffrfHrQrvC0GWQ6dGFW2NYpO7wAncuouj3a7x9-efNWK5BigE3wuSISWQrb117Yj3--hBbbR8I55kJM-nQNFODkzp19QMyrIs7NEx2AmYuZLiG4Q913WP9-EzS9UidFbrt5cS_B-dFjzplqe-FXg38zMhVhWTpEkQ38zUAl-ypu58Ph9NpzezV0SSJegcN9Ib9onkU6CkyFQ3Wou19T1dRK3EGtGNVzq8nL_W2BV2pbAWG5t4qV-MsFSv0_3yi_B-KUY41NcjMMIRLzWUFEo8bHiCQyULMLEUxdMCh5RotZu4WKVEwZSRJ_2ItXdF-CchlhVFmzjc4jUOnbH_xnEsz_bdsWW7lmviDQ6t0sQ_9njbxKCnEPLDYdnvd375D2534-s?type=png)](https://mermaid.live/edit#pako:eNqdVNmK2zAU_RWhEAzBKV6S8VLah8ny1qcZ-tC6FNm-mog6UirLTNJg6G-0H1KY3-kPzC9UWbxlgVA96d57zl2kw93iRKSAQ9zvbyOOjodxpkLUcuyOoRawBCNERkxyMMxL0Y9EMhJnkBvn9JVkSyI3E5EJucvSmwUzb-adJTriHmGtGqy1P9ew90KmIBv05CI4YxwazNy_d5zgDJRDInja6TOwAzeYnA8MUrEOkFJqdEFlYx6vZb8fcZqJ52RBpEKPU-3m-gu-uikknm-Rz2gwWKN3yB4M0JfTIBoO3x88kIwsJ3ZHFaKyt5o-hYTlTHCdoTyNNxnieOzcjVLvOoK6I39se3GFqBjbXRFGkW7z0GdZnkKaJM6IEjv160Yrezen_j6uXl9-rV9ffrfHrQrvC0GWQ6dGFW2NYpO7wAncuouj3a7x9-efNWK5BigE3wuSISWQrb117Yj3--hBbbR8I55kJM-nQNFODkzp19QMyrIs7NEx2AmYuZLiG4Q913WP9-EzS9UidFbrt5cS_B-dFjzplqe-FXg38zMhVhWTpEkQ38zUAl-ypu58Ph9NpzezV0SSJegcN9Ib9onkU6CkyFQ3Wou19T1dRK3EGtGNVzq8nL_W2BV2pbAWG5t4qV-MsFSv0_3yi_B-KUY41NcjMMIRLzWUFEo8bHiCQyULMLEUxdMCh5RotZu4WKVEwZSRJ_2ItXdF-CchlhVFmzjc4jUOnbH_xnEsz_bdsWW7lmviDQ6t0sQ_9njbxKCnEPLDYdnvd375D2534-s)




  We can insert titles in flowchart and labels in chart

  ``` python
  code = """
  x = 1
  for i in range(x):
      print(i)
  x += 2

  print(x)
  """
  mermaid_diagram = code_to_mermaid(code, "For loop diagram")
  ```

  [![](https://mermaid.ink/img/pako:eNqdVNuO2jAQ_RXLK8QuDYjcSOxq-7Bc3vZpV31os6pMYoPVYCPHaKEsH9L-yX7V_kKdkBACVEL1k2fmnJlx5mS2MJYJhRh2u91IaK5TisFEKpBKuQQJJzNFFpEooq3WNhKgPFxwjcGRIz9tPacL2sagPSUZbVuXol-J4mSa0qx9Tl8qviBqM5SpVHmWmzEaB-PgLFGJe6ZrXWP7xfkX9kGqhKoaPbwITrmgNWYSPjgOOgNlNJYiafSJbOSi4fmDqdK8AWSMtZugXW2W112rFQmWytd4TpQGzyPjFmZKP0ji2mhgs--g01mDe2B3OuDlNAi63S97z9RmKCaJVyEq-_bW8JmZMTdTBIqIGf14_73-eP9j8t3dncLrhHTgUOQwPxINMwe85Xp5u1y3wuVtm2kIbarxfbWXU0xdLPBcBzEvrBCVvX_8p3vgHPOraNHLhAuSAkWzVarLntz-NE6Ic-ipso97Wh96yrUOnvTGqDQScUqybEQZyKfONZd5csbTFN8wn9oxtTKt5E-Kb1zXLe_dV57oOXaW68-XEvwfna1E3CzPwj4KruYXv3TJJEmMplczjY4XvK47mUy80ehq9pKYHUJNjivpNftE2QllxIy0GT3INH9eM3QQ1UXiQTIXo5VAjqLQggvzIQhPzL4sVlcEi5UWQWyuJTCCkdgZKFlp-bQRMcRaragFlVzN5hAzkmbGWi0Toulov18ryJKIb1IemxBv4Rpix0e90PZD33f80A0827PgBmKv33MD3wuQ6wch8tBgZ8FfRYJ-D3m274TuIAxs3-uHtgWp0Z5Uj_t1X2z93V8-6eIJ?type=png)](https://mermaid.live/edit#pako:eNqdVNuO2jAQ_RXLK8QuDYjcSOxq-7Bc3vZpV31os6pMYoPVYCPHaKEsH9L-yX7V_kKdkBACVEL1k2fmnJlx5mS2MJYJhRh2u91IaK5TisFEKpBKuQQJJzNFFpEooq3WNhKgPFxwjcGRIz9tPacL2sagPSUZbVuXol-J4mSa0qx9Tl8qviBqM5SpVHmWmzEaB-PgLFGJe6ZrXWP7xfkX9kGqhKoaPbwITrmgNWYSPjgOOgNlNJYiafSJbOSi4fmDqdK8AWSMtZugXW2W112rFQmWytd4TpQGzyPjFmZKP0ji2mhgs--g01mDe2B3OuDlNAi63S97z9RmKCaJVyEq-_bW8JmZMTdTBIqIGf14_73-eP9j8t3dncLrhHTgUOQwPxINMwe85Xp5u1y3wuVtm2kIbarxfbWXU0xdLPBcBzEvrBCVvX_8p3vgHPOraNHLhAuSAkWzVarLntz-NE6Ic-ipso97Wh96yrUOnvTGqDQScUqybEQZyKfONZd5csbTFN8wn9oxtTKt5E-Kb1zXLe_dV57oOXaW68-XEvwfna1E3CzPwj4KruYXv3TJJEmMplczjY4XvK47mUy80ehq9pKYHUJNjivpNftE2QllxIy0GT3INH9eM3QQ1UXiQTIXo5VAjqLQggvzIQhPzL4sVlcEi5UWQWyuJTCCkdgZKFlp-bQRMcRaragFlVzN5hAzkmbGWi0Toulov18ryJKIb1IemxBv4Rpix0e90PZD33f80A0827PgBmKv33MD3wuQ6wch8tBgZ8FfRYJ-D3m274TuIAxs3-uHtgWp0Z5Uj_t1X2z93V8-6eIJ)



  ``` python
  code = """
  k = 10
  while k > 4:
      
      k = k -1

  print(k)
  """
  mermaid_diagram = code_to_mermaid(code, "While loop diagram")
  ```

  [![](https://mermaid.ink/img/pako:eNqdVO1u2jAUfRXLFaJFSRXn257WHy3l33612qQt02QSp1gYGzlGLaM8SPcmfaq-wpyQQClMQvMv33vPObZ1j-8K5qpgkEDXdTNpuBGMgG8TLhgQSs1BwemDprNMNvVeb5VJ0C4uuSHgXaJefTNhM9YnoD-mFes7x6pfqeZ0LFjVP6TPNZ9RvbxRQula5ewW3ya3yYFQi7tnT2aH9Zr1L-y10gXTO_TNUbDgku0wo_Ta9_EBqGK5ksXePTHCAb45fDDThu8By7Ls74PWu7Ddrnu9TJZCPeYTqg24H9q0tH36hdM4TsIk_gEGgyn4DJA3GICfH6vAda82GUpDz_fitEN08fm5FXhs2jwFVyC0KhcXH0G1zPOQ5ZrZVoLp86Y6jhEqEC46dBd3V5oCF72_VFdv1EZcUgE0qxbCdHpeSqM4Rlt8G9d6tnPSvL2-TN9e_2w0aw-CO7O07slkLmhVDVkJ6m5ww1UtXnIhyFkZMZQzpzJaTRk5C4Kg3buPvDAT4s-fPh0T-D96uZD5_vFl6uHkZH7z1VomLXI8Pplp_TXju3NHo1E4HJ7MnlP7t5nVOJG-Y38wXMFKalu6X936qH7efmlriqPEzgLvqtCBM_tUygs7q5qhkcFmmGSQ2G0LzGAm1xZKF0bdLWUOidEL5kCtFg8TSEoqKhst5gU1bLiZbNvsnMrvSs06ig0hWcEnSPwIX6YoSqPIj9IgCVHowCUkoXcZJFGY4CBKUhzieO3A342Ad4lDFPkWizFKUBimDmTWXkp_2czaZuSu_wJ_1q6C?type=png)](https://mermaid.live/edit#pako:eNqdVO1u2jAUfRXLFaJFSRXn257WHy3l33612qQt02QSp1gYGzlGLaM8SPcmfaq-wpyQQClMQvMv33vPObZ1j-8K5qpgkEDXdTNpuBGMgG8TLhgQSs1BwemDprNMNvVeb5VJ0C4uuSHgXaJefTNhM9YnoD-mFes7x6pfqeZ0LFjVP6TPNZ9RvbxRQula5ewW3ya3yYFQi7tnT2aH9Zr1L-y10gXTO_TNUbDgku0wo_Ta9_EBqGK5ksXePTHCAb45fDDThu8By7Ls74PWu7Ddrnu9TJZCPeYTqg24H9q0tH36hdM4TsIk_gEGgyn4DJA3GICfH6vAda82GUpDz_fitEN08fm5FXhs2jwFVyC0KhcXH0G1zPOQ5ZrZVoLp86Y6jhEqEC46dBd3V5oCF72_VFdv1EZcUgE0qxbCdHpeSqM4Rlt8G9d6tnPSvL2-TN9e_2w0aw-CO7O07slkLmhVDVkJ6m5ww1UtXnIhyFkZMZQzpzJaTRk5C4Kg3buPvDAT4s-fPh0T-D96uZD5_vFl6uHkZH7z1VomLXI8Pplp_TXju3NHo1E4HJ7MnlP7t5nVOJG-Y38wXMFKalu6X936qH7efmlriqPEzgLvqtCBM_tUygs7q5qhkcFmmGSQ2G0LzGAm1xZKF0bdLWUOidEL5kCtFg8TSEoqKhst5gU1bLiZbNvsnMrvSs06ig0hWcEnSPwIX6YoSqPIj9IgCVHowCUkoXcZJFGY4CBKUhzieO3A342Ad4lDFPkWizFKUBimDmTWXkp_2czaZuSu_wJ_1q6C)

  4. Function Nodes

  ``` python
  code = """
  def forward(self, x):
      x = self.conv1(x)
      x = self.conv2(x)
      x = self.conv3(x)
      return x
  """
  mermaid_diagram = code_to_mermaid(code, "Function diagram")
  ```
  [![](https://mermaid.ink/img/pako:eNqdVO1u2jAUfRXLFWKLAspnE2fapLbAr1Wa2mo_VleVSexiLdjIcVYY4kG2N-lT9RVmQkJGySQ0__K995xz7fjkrmEqMwoTOBgMsNBc5zQBk1KkmksBMk6eFJljUVV7vTUWoF5ccJ2AvxLb1dczOqf9BPSnpKB9u6v6lShOpjkt-sf0heJzolZXMpdqq3I2RuNoHB0J1bg7utQt1qnWv7CXUmVUteirTnDOBW0xk_jS89ARqKCpFNnBOZGLfHR1fGGqND8AMsb6h6BNG9bbTa-HBcvlczojSoO7kUkL80qPbhbH1E-n98CyluAjKGjOhuYsP9zXl1_L15fflgUe3oLBYPBpl0mDcxoFkdcgmvhIzuuQa8Ct3DkLwoh4foNo4iM5v0OuAbdyzpSQ2PFYg2jid_eWpagulQBLy3p4jwUWRTk1vlzMwJeLm4vr8d345haLjCu6s-3nGywWxBj30dmyaxoVGRYtoe3cfKmtcq8HbvXKuBOLNCdFMaIMbF-bb4VJDhjP8-SMhdRNqV1oJb_T5Mz3_Xo_eOaZniXeYvmhS-D_6Kz-Hdv2LHZQdDI_l3LRMEmWounJTOPfOW_7TiaTYDQ6mV09ATUaJ9Jb9hsHZ5SRMteH1b0hO6t7f3VWG2_tL7gv17Zpz24q0IZzgyM8M3OyGlkYVqMMw8Rs6w4YYrExUFJqebsSKUy0KqkNlSyfZjBhJC9MVC4youloN1f32QUR36ScNxQTwmQNlzDxQjSM3TAOQy-M_ShwAxuuYBI4Qz8Kgwj5YRSjAJ1vbPizEnCGKHBDz2ARciM3CGIbUmM-qa53c74a95s_XunieQ?type=png)](https://mermaid.live/edit#pako:eNqdVO1u2jAUfRXLFWKLAspnE2fapLbAr1Wa2mo_VleVSexiLdjIcVYY4kG2N-lT9RVmQkJGySQ0__K995xz7fjkrmEqMwoTOBgMsNBc5zQBk1KkmksBMk6eFJljUVV7vTUWoF5ccJ2AvxLb1dczOqf9BPSnpKB9u6v6lShOpjkt-sf0heJzolZXMpdqq3I2RuNoHB0J1bg7utQt1qnWv7CXUmVUteirTnDOBW0xk_jS89ARqKCpFNnBOZGLfHR1fGGqND8AMsb6h6BNG9bbTa-HBcvlczojSoO7kUkL80qPbhbH1E-n98CyluAjKGjOhuYsP9zXl1_L15fflgUe3oLBYPBpl0mDcxoFkdcgmvhIzuuQa8Ct3DkLwoh4foNo4iM5v0OuAbdyzpSQ2PFYg2jid_eWpagulQBLy3p4jwUWRTk1vlzMwJeLm4vr8d345haLjCu6s-3nGywWxBj30dmyaxoVGRYtoe3cfKmtcq8HbvXKuBOLNCdFMaIMbF-bb4VJDhjP8-SMhdRNqV1oJb_T5Mz3_Xo_eOaZniXeYvmhS-D_6Kz-Hdv2LHZQdDI_l3LRMEmWounJTOPfOW_7TiaTYDQ6mV09ATUaJ9Jb9hsHZ5SRMteH1b0hO6t7f3VWG2_tL7gv17Zpz24q0IZzgyM8M3OyGlkYVqMMw8Rs6w4YYrExUFJqebsSKUy0KqkNlSyfZjBhJC9MVC4youloN1f32QUR36ScNxQTwmQNlzDxQjSM3TAOQy-M_ShwAxuuYBI4Qz8Kgwj5YRSjAJ1vbPizEnCGKHBDz2ARciM3CGIbUmM-qa53c74a95s_XunieQ)

  You can suppress `self.` in nodes

  ``` python
  code = """
  def forward(self, x):
      x = self.conv1(x)
      x = self.conv2(x)
      
      x = self.conv3(x)
      return x
  """
  mermaid_diagram = code_to_mermaid(
      code,
      "Function diagram without self",
      remove_self=True
  )
  ```

  [![](https://mermaid.ink/img/pako:eNqdlN9O2zAYxV_FMqq6RSlq_pE40yYBba9AmgDtYhghN3aotdSuHGe0gz7I9iY8Fa8wJ00aSjOpmq9sf79zbDen3xNMJGUwhoPBAAvNdcZiMClEorkUgHLyoMgcPHI9k4UGOctSLCq013vCAtSDC65j8GajHH09Y3PWj0F_SnLWt7uq34jiZJqxvL8vXyg-J2p1LjOpSpejMRqH43DPqOZu2FK37LAa_2LPpKJMtfR5J5xxwVpmEp25LtqDcpZIQXfuiRzkofP9BzOl-Q6Ypml_F1q3y3q67vWwSDP5mMyI0uBmZLaF-WT3CUv8gJ2kt8CyluAzAOYeP53Xl9_L15c_lgXu3oNgMPiy2UEhJX7Ihg3RrHes3A6rBiytnidckKxCnzfVqc-cyAn9hm7WO7Zeh20Dtjd0kOtOI0oaoll_uLUsxXShBFha1t1HLLDIi6kJ6WIGvp5enV6Ob8ZX11hQrtgmwxdXWCyISfH9sFTXMiYoFq2gPbn5tUrnXg9c65VJJxZJRvJ8xNLyDZSXxubtKc-y-CgNmJMwO9dK_mDxked59XzwyKmexe5i-anL4P_kaf3fbI9PoyEKD9ZnUi4aJaEJmh6sNPmd8_bcyWTij0YHq6tPwIzHgfJW_S7FlKWkyPRudRvMzuo2X53VJlvbB27LdWzau5sKtOHccIRT0zSrloVh1cowjM20PgFDLNYGJYWW1yuRwFirgtlQyeJhBuOUZLlZFQtKNBttmmyDLIj4LuXbJYyf4BLGboCOIyeIgsANIi_0Hd-GKxj7w2MvDPwQeUEYIR-drG34qzIYHiPfCVzDIuSEju-HNmQme1Jdbnp-1frXfwEw_efG?type=png)](https://mermaid.live/edit#pako:eNqdlN9O2zAYxV_FMqq6RSlq_pE40yYBba9AmgDtYhghN3aotdSuHGe0gz7I9iY8Fa8wJ00aSjOpmq9sf79zbDen3xNMJGUwhoPBAAvNdcZiMClEorkUgHLyoMgcPHI9k4UGOctSLCq013vCAtSDC65j8GajHH09Y3PWj0F_SnLWt7uq34jiZJqxvL8vXyg-J2p1LjOpSpejMRqH43DPqOZu2FK37LAa_2LPpKJMtfR5J5xxwVpmEp25LtqDcpZIQXfuiRzkofP9BzOl-Q6Ypml_F1q3y3q67vWwSDP5mMyI0uBmZLaF-WT3CUv8gJ2kt8CyluAzAOYeP53Xl9_L15c_lgXu3oNgMPiy2UEhJX7Ihg3RrHes3A6rBiytnidckKxCnzfVqc-cyAn9hm7WO7Zeh20Dtjd0kOtOI0oaoll_uLUsxXShBFha1t1HLLDIi6kJ6WIGvp5enV6Ob8ZX11hQrtgmwxdXWCyISfH9sFTXMiYoFq2gPbn5tUrnXg9c65VJJxZJRvJ8xNLyDZSXxubtKc-y-CgNmJMwO9dK_mDxked59XzwyKmexe5i-anL4P_kaf3fbI9PoyEKD9ZnUi4aJaEJmh6sNPmd8_bcyWTij0YHq6tPwIzHgfJW_S7FlKWkyPRudRvMzuo2X53VJlvbB27LdWzau5sKtOHccIRT0zSrloVh1cowjM20PgFDLNYGJYWW1yuRwFirgtlQyeJhBuOUZLlZFQtKNBttmmyDLIj4LuXbJYyf4BLGboCOIyeIgsANIi_0Hd-GKxj7w2MvDPwQeUEYIR-drG34qzIYHiPfCVzDIuSEju-HNmQme1Jdbnp-1frXfwEw_efG)

  5. Diagram orientation

  ``` python
  code = """
  def forward(self, x_tensor):
      x_tensor = F.tanh(x_tensor)
      return x_tensor
  """
  mermaid_diagram = code_to_mermaid(
      code,
      "Diagram orientation",
      orientation="LR",
  )
  ```

  [![](https://mermaid.ink/img/pako:eNqdVG2O2jAQvYrlFUobBRQIAeyqK-3y8asrVbDqjzYVMslksRrsyHG0UMRB2pvsqfYKdQIhZaES6vzyjN97ntgvs8WhjABT3Gw2A6G5ToCiEWdPiq2QVByEZppLEYgS0GhsA4EOwQXXFP1VKMLSS1iBRZG1YBlYzqXdL0xxtkggs87pqeIrpjZDmUhVqNyMybg_7p8JHXCPsNY11i3jX9h7qSJQNXp4EZxwATVmMrjvdMgZKINQiuikT9ImHhmefzAozU-AcRxbp6BdnR6Wu0YjEHEin8MlUxp9mpqyMA81b5MQugPWu7Xt9VyDyKRCH9GkpZlYvr78qmqvL79t-_tbEmo2b_cVEro-LMigQlT5u2-2rUDnSqBKyui8D8z7Z_nCmCJdos9307uH8eN4OgtExBWEhT_KFlNmXDN3C5FTNogoEDWv7qPqrDig0UAzvTGuCESYsCwbQYyKW-aFPktQzJOE3sQ-tENwMq3kD6A3nucd1s1nHukl7aTrD5cE_o8e5yI8PT4euKR_NT-RMq2YLArJ4mqm8c2K1-dOJpPuaHQ1u3wJMBpX0mv2G8fUF3AKqAxz7PO4fTBB3YLZwQ5eGRzjkZk05R8f4HISBJiaZQQxyxMd4EDsDJTlWs42IsRUqxwcrGT-tMQ0ZklmsjyNmIbDiDpWUya-SrmqKCbFdIvXmLoO3mDa7pGWT_xetzcgXr_d9gY7B_8sCW6L7KPresT3fL_jYDCekephPxnLAbn7A0XGofo?type=png)](https://mermaid.live/edit#pako:eNqdVG2O2jAQvYrlFUobBRQIAeyqK-3y8asrVbDqjzYVMslksRrsyHG0UMRB2pvsqfYKdQIhZaES6vzyjN97ntgvs8WhjABT3Gw2A6G5ToCiEWdPiq2QVByEZppLEYgS0GhsA4EOwQXXFP1VKMLSS1iBRZG1YBlYzqXdL0xxtkggs87pqeIrpjZDmUhVqNyMybg_7p8JHXCPsNY11i3jX9h7qSJQNXp4EZxwATVmMrjvdMgZKINQiuikT9ImHhmefzAozU-AcRxbp6BdnR6Wu0YjEHEin8MlUxp9mpqyMA81b5MQugPWu7Xt9VyDyKRCH9GkpZlYvr78qmqvL79t-_tbEmo2b_cVEro-LMigQlT5u2-2rUDnSqBKyui8D8z7Z_nCmCJdos9307uH8eN4OgtExBWEhT_KFlNmXDN3C5FTNogoEDWv7qPqrDig0UAzvTGuCESYsCwbQYyKW-aFPktQzJOE3sQ-tENwMq3kD6A3nucd1s1nHukl7aTrD5cE_o8e5yI8PT4euKR_NT-RMq2YLArJ4mqm8c2K1-dOJpPuaHQ1u3wJMBpX0mv2G8fUF3AKqAxz7PO4fTBB3YLZwQ5eGRzjkZk05R8f4HISBJiaZQQxyxMd4EDsDJTlWs42IsRUqxwcrGT-tMQ0ZklmsjyNmIbDiDpWUya-SrmqKCbFdIvXmLoO3mDa7pGWT_xetzcgXr_d9gY7B_8sCW6L7KPresT3fL_jYDCekephPxnLAbn7A0XGofo)

  6. Full Diagram

  ``` python
  code = """
  def myfunc(self, x: Tensor):
      x = self.conv1(x)
      
      x = F.softmax(x)
      if x > 10:  #> Check threshold
          print("Greater than 10")
      elif x < 5:
          print("Less than 5")
      else:
          print("Between 5 and 10")
      for i in range(10):
          print(i)
          i += 1
      z = x + 1
      while z < 10:
          z += 1
      
      return z
  """
  mermaid_diagram = code_to_mermaid(
      code,
      "Complete Flowchart",
      "TB",
      True
  )
  ```

  [![](https://mermaid.ink/img/pako:eNqdVu1u2zYUfRVCgeHUtQ19f3UN0MTx_rTAkAT7saooaOkyJiZTBiU3zoeBvcb2IAP6OnuBvsIoWaQsWR6C6Zeu7rmHR5fkIZ-1OEtAC7XJZBKxghYphOgqW61TKADN0-whXmJeRKzKDwbPEUP1QxktQnTwoXyGxRJWMAzRcIFzGI77sr9iTvEihXx4XL7mdIX541WWZrxkObsOrr1r74ioxt3BtmiwevWcwl5mPAHeoK96wSll0GDm_qVpBkegHOKMJS2dgRFYwdXxDwMvaAtICBm2QbsmrF93g0HEiGw-ursUn5mYp68x2LHrBM5nNBpt0XuEhI5vxo_vf25_fP9rNEJfukA0mVy8zDcsRjFO05d9EhJDT_TElGAZX-xJ59M8I8UKbxXvly6ypN1_cV0vxo6ZSISMn4XCGcQ0pxkTwnbdfMNgWpZh6gn5D4SduLHvLU4jLMsE28auREjO51IGJWiLLpChlzp2XUhD4vkLYsQklggZl80Wa4gVoh___PH3zxywmFZULDETpOJLp_eyrmH2A2KL1qkfkD9UyYO0EvgTctr6akzDonuBbbqWIxEy7uj7CHm-F-cca5M1p7XJVtbacmipktmmXvB5xsL1JULGHVWXUDwACE0Is6S3bbLwtDQZn58LbpJxRIUJIY7ZPYhBDH1P-OZNF38wxbobm4EOaqrq-FAs7U5njWlYFrrjJp6nVqyMSxaK3r5HxmG9zDb1sCCxY-u62lV1XNY_iQ24RW_bFBLQUDi-6RoGqLUq46o1D0uaAnoSS6pa801DJOpg9izXx7qjeGS8l9L9FZnduwplOEUc8k1a1MZiESI2pqfWgozPP49GHIoNZ-hJuInQ0-nMVPClWbZ-6U58Z9gOrulCxPLN4p7j9RL98uHmw6fru-ub24gllENcCAtCH28itsYcr77qpZrtXgYwYVxNQdMX6Z8l82CAbotHcV5FLE5xns-AlL6b0JJYtIDQNA3PiANGDOO84NnvEJ5ZllW_Tx5oUixDc71910fw_8qJsPT28MTXA-_V9WUTZSVO4mDx6kphfSvajDufz-3Z7NXV1RRAaZ-vK2-qO-daAgSLhdfOquOpaU8boE6Og_lrI9SxoBDtvDL3XgHKtE9UK_vtrVbmeqJaOWRvtXK7cm47oqWF9RaqbdjfU-k9vVnlKMeDql3b_6-1Naj1pNL1Lm2WyrtyE2pjbSWQmCbislrdGiOtuk1GWihe6zEiLWI7AcWbIrt9ZLEWFnwDY41nm_ulFhIszrOxtlkn4gSfUSwMYyUha8x-y7LDUAufta0WGpY99W3H8QIv0E3PN5yx9qiFEytwp2KpmHbgG5ZIBe5urD1VFMbUcxzD9kzD93TbNC13rIGY0Yx_2t-2q0v37l_ztq64?type=png)](https://mermaid.live/edit#pako:eNqdVu1u2zYUfRVCgeHUtQ19f3UN0MTx_rTAkAT7saooaOkyJiZTBiU3zoeBvcb2IAP6OnuBvsIoWaQsWR6C6Zeu7rmHR5fkIZ-1OEtAC7XJZBKxghYphOgqW61TKADN0-whXmJeRKzKDwbPEUP1QxktQnTwoXyGxRJWMAzRcIFzGI77sr9iTvEihXx4XL7mdIX541WWZrxkObsOrr1r74ioxt3BtmiwevWcwl5mPAHeoK96wSll0GDm_qVpBkegHOKMJS2dgRFYwdXxDwMvaAtICBm2QbsmrF93g0HEiGw-ursUn5mYp68x2LHrBM5nNBpt0XuEhI5vxo_vf25_fP9rNEJfukA0mVy8zDcsRjFO05d9EhJDT_TElGAZX-xJ59M8I8UKbxXvly6ypN1_cV0vxo6ZSISMn4XCGcQ0pxkTwnbdfMNgWpZh6gn5D4SduLHvLU4jLMsE28auREjO51IGJWiLLpChlzp2XUhD4vkLYsQklggZl80Wa4gVoh___PH3zxywmFZULDETpOJLp_eyrmH2A2KL1qkfkD9UyYO0EvgTctr6akzDonuBbbqWIxEy7uj7CHm-F-cca5M1p7XJVtbacmipktmmXvB5xsL1JULGHVWXUDwACE0Is6S3bbLwtDQZn58LbpJxRIUJIY7ZPYhBDH1P-OZNF38wxbobm4EOaqrq-FAs7U5njWlYFrrjJp6nVqyMSxaK3r5HxmG9zDb1sCCxY-u62lV1XNY_iQ24RW_bFBLQUDi-6RoGqLUq46o1D0uaAnoSS6pa801DJOpg9izXx7qjeGS8l9L9FZnduwplOEUc8k1a1MZiESI2pqfWgozPP49GHIoNZ-hJuInQ0-nMVPClWbZ-6U58Z9gOrulCxPLN4p7j9RL98uHmw6fru-ub24gllENcCAtCH28itsYcr77qpZrtXgYwYVxNQdMX6Z8l82CAbotHcV5FLE5xns-AlL6b0JJYtIDQNA3PiANGDOO84NnvEJ5ZllW_Tx5oUixDc71910fw_8qJsPT28MTXA-_V9WUTZSVO4mDx6kphfSvajDufz-3Z7NXV1RRAaZ-vK2-qO-daAgSLhdfOquOpaU8boE6Og_lrI9SxoBDtvDL3XgHKtE9UK_vtrVbmeqJaOWRvtXK7cm47oqWF9RaqbdjfU-k9vVnlKMeDql3b_6-1Naj1pNL1Lm2WyrtyE2pjbSWQmCbislrdGiOtuk1GWihe6zEiLWI7AcWbIrt9ZLEWFnwDY41nm_ulFhIszrOxtlkn4gSfUSwMYyUha8x-y7LDUAufta0WGpY99W3H8QIv0E3PN5yx9qiFEytwp2KpmHbgG5ZIBe5urD1VFMbUcxzD9kzD93TbNC13rIGY0Yx_2t-2q0v37l_ztq64)



  **code2mermaid** use a color palette pre-defined. But through the `_node_style` parameter you can change it.

  To check the default style:

  ``` python
  from code2mermaid.style import node_style
  print(node_style)
  ```



  **code2mermaid** was developed using 3.5 Sonnet. Thanks to Anthropic for making it available free via Claude.


pkgId: a1711ed098669aa21bfd20f6fd17b606ee34d2ab91a41fc5f31bef7f77395893
name: python-code4
arch: src
version: 0.0.1
epoch: 0
release: 1
summary: Some Python tools
url: https://pypi.org/project/code4/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code4-0.0.1-1.src.rpm
checksum_type: sha256
description:
  [![GitHub contributors][ico-contributors]][link-contributors]
  [![GitHub last commit][ico-last-commit]][link-last-commit]
  [![License: MPL 2.0][ico-license]][link-license]

  The `code4` package provides various Python utility functions.


  [A Simple Example](#a-simple-example) | [Feedback](#feedback) | [License](#license) | [About Code for Romania](#about-code-for-romania)



  ```python
  from code4.django.decorators import expiring_url

  @expiring_url(max_age=72*60*60)
  def download_document(request, document_id):
      pass

  ```



  * Request a new feature on GitHub.
  * Vote for popular feature requests.
  * File a bug in GitHub Issues.
  * Email us with other feedback contact@code4.ro



  This project is licensed under the MPL 2.0 License – see the [LICENSE](LICENSE) file for details



  Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community of around 2.000 volunteers (developers, ux/ui, communications, data scientists, graphic designers, devops, it security and more) who work pro bono for developing digital solutions to solve social problems. #techforsocialgood. If you want to learn more details about our projects [visit our site][link-code4] or if you want to talk to one of our staff members, please e-mail us at contact@code4.ro.

  Last, but not least, we rely on donations to ensure the infrastructure, logistics and management of our community that is widely spread across 11 timezones, coding for social change to make Romania and the world a better place. If you want to support us, [you can do it here][link-donate].


  [ico-contributors]: https://img.shields.io/github/contributors/code4romania/pyromania.svg?style=for-the-badge
  [ico-last-commit]: https://img.shields.io/github/last-commit/code4romania/pyromania.svg?style=for-the-badge
  [ico-license]: https://img.shields.io/badge/license-MPL%202.0-brightgreen.svg?style=for-the-badge

  [link-license]: https://opensource.org/licenses/MPL-2.0

  [link-code4]: https://www.code4.ro/en/
  [link-donate]: https://code4.ro/en/donate/


pkgId: b4b067a55a0f346d2cb299878ca9a8c31de00a71f6ac23da827d74fbfc12c41c
name: python-code8
arch: src
version: 0.1.6
epoch: 0
release: 1
url: https://github.com/naserjamal/code8
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-code8-0.1.6-1.src.rpm
checksum_type: sha256
summary:
  a dashboard to use LLMs to directly on your code files, save and load custom profiles with custom prompts and more.

description:
  code8 is a dashboard to use LLMs to directly on your code files, save and load custom profiles with custom prompts and more.



  ```python
  pip install code8
  ```



  After installation, simply run the following command in your terminal:

  ```python
  code8
  ```

  This will open up a web browser with the code8 UI, allowing you configure settings
  and select files to run the LLMs on.

  After configuring the settings using "code8", you could continue using the tool
  through the UI with "code8", or you could use it in your terminal:

  ```python
  code8 example.py
  ```

  this will run the tool directly from the terminal without having to use the UI.


pkgId: 242f67640ab36d659caaeb529765ac7295966c010bf266459a7e7e3caab82ce0
name: python-codeUtils-elfin
arch: src
version: 0.1.4
epoch: 0
release: 1
summary: 常用功能模块快速使用库.
url: https://pypi.org/project/codeUtils-elfin/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codeUtils-elfin-0.1.4-1.src.rpm
checksum_type: sha256
description:
  代码工具箱，记录关键代码防止重复开发, Github地址: [codeUtils](https://github.com/firstelfin/codeTools)



  ```shell
  pip install --index-url https://pypi.org/simple codeUtils-elfin
  ```



  ```shell
  python3 -m pip install --upgrade build
  python -m build
  twine upload dist/*
  ```


  - [x] 完成task_manage模块的编写: 参考[文档](./docs/task_manage.md)


pkgId: 5a7d22f562c430bdc15b3705e2fd164982c7c0f3919b0fd6f475cf28eb275460
name: python-codealchemy
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: CodeAlchemy is a Python package that provides utility and decorators for development.
url: https://github.com/girishcodealchemy/codealchemy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codealchemy-1.2.1-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/codealchemy)](https://pypi.org/project/codealchemy/)
  ![License](https://img.shields.io/pypi/l/codealchemy)
  ![Python versions](https://img.shields.io/pypi/pyversions/codealchemy)

  `codealchemy` is a Python package that provides decorators and utilities for Development
  `CodeAlchemy` is a versatile Python package designed to simplify development workflows by providing powerful decorators for logging, performance monitoring, and utilities. Whether you're looking to track function execution times, group logs for better readability, or Utility methods to interact with other services.



  - **Decorators**: Enhance your Python functions with performance tracking and logging capabilities.
  - **Kafka Utilities**: Easily produce and consume messages with Kafka, with advanced features like round-robin message distribution and offset management.



  You can install `codealchemy` using pip:

  ```sh
  pip install codealchemy
  ```



  Here is how you can use the `codealchemy` package in your Python code:



  - **`code_execution_time`**: This decorator logs the execution time of the decorated function.
  - **`log_group(group_name)`**: This decorator logs entry and exit points of the decorated function, grouping logs under a specified group name.

  1. code execution time

  ```python
  from codealchemy import code_execution_time

  @code_execution_time
  def example_function():
      import time
      time.sleep(2)
      print("Function executed")

  example_function()
  ```

  2. Log groups

  ```python

  from codealchemy import log_group
  import logging


  logging.getLogger(__name__).setLevel(logging.INFO)

  @log_group("MainGroup")
  def main_function():
      print("Inside main function")
      print("*"*20)
      logging.info("Inside main function")
      inner_function()

  @log_group("InnerGroup")
  def inner_function():
      print("Inside inner function")
      print("*"*20)
      logging.info("Inside inner function")
      innermost_function()

  @log_group("InnermostGroup")
  def innermost_function():
      print("Inside innermost function")
      print("*"*20)
      logging.info("Inside innermost function")
      print("Innermost function executed")

  main_function()
  ```

  ![image](https://github.com/user-attachments/assets/15495373-711d-4b72-9fbb-32acb80c110b)



  - **`kafkaUtils`**: A utility module that simplifies Kafka-related operations for Python developers.

  1. Kafka Producer:
     The Kafka producer sends messages to Kafka topics. Here's how you can use it:

     ```python
     from codealchemy import kafkaUtils

     config_file = "config.json"
     topic = "topic_name"

     producer = kafkaUtils.KafkaProducer(config_file, topic)


     print("\nProducing Messages to default partition:")
     
     for i in range(10):
         
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message(message)
     
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()


     print("\nProducing Messages to Particular partition:")
     
     for i in range(10):
         
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message(message, partition=1)
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()


     print("\nProducing Messages in Round Robin:")
     
     for i in range(10):
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message_round_robin(message)
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()
     ```

  2. Kafka Consumer:
     The Kafka consumer consumes messages from Kafka topics. Here's how you can use it:

     ```python
     from codealchemy import kafkaUtils

     config_file = "config.json"
     topic = "topic_name"
     group_id = "group_id"

     auto_offset = "earliest"
      
      

     consumer = kafkaUtils.KafkaConsumer(config_file, topic, group_id, auto_offset)
     consumer.consume_messages()

     ```

     If you need to consume from particular offset

     ```python
     consumer = kafkaUtils.KafkaConsumer(config_file, topic, group_id, auto_offset, offset=10)
     consumer.consume_from_offset(partition=1, offset=2350)
     ```

     Sample `config.json`

     ```json
     {
       "bootstrap.servers": "kafkabroker:9093",
       "security.protocol": "SSL",
       "ssl.key.password": "Password@1",
       "ssl.certificate.location": "/etc/secrets/kafka/truststore.pem",
       "ssl.key.location": "/etc/secrets/kafka/keystore.pem",
       "ssl.ca.location": "/etc/secrets/kafka/caroot.pem"
     }
     ```



  This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.


pkgId: c7e3883b3887268080c223e20663441e22af15180799a1784f9dfa86a71eb896
name: python-codealchemy
arch: src
version: 1.2.3
epoch: 0
release: 1
summary: CodeAlchemy is a Python package that provides utility and decorators for development.
url: https://github.com/girishcodealchemy/codealchemy
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codealchemy-1.2.3-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://img.shields.io/pypi/v/codealchemy)](https://pypi.org/project/codealchemy/)
  ![License](https://img.shields.io/pypi/l/codealchemy)
  ![Python versions](https://img.shields.io/pypi/pyversions/codealchemy)

  `codealchemy` is a Python package that provides decorators and utilities for Development
  `CodeAlchemy` is a versatile Python package designed to simplify development workflows by providing powerful decorators for logging, performance monitoring, and utilities. Whether you're looking to track function execution times, group logs for better readability, or Utility methods to interact with other services.



  - **Decorators**: Enhance your Python functions with performance tracking and logging capabilities.
  - **Kafka Utilities**: Easily produce and consume messages with Kafka, with advanced features like round-robin message distribution and offset management.



  You can install `codealchemy` using pip:

  ```sh
  pip install codealchemy
  ```



  Here is how you can use the `codealchemy` package in your Python code:



  - **`code_execution_time`**: This decorator logs the execution time of the decorated function.
  - **`log_group(group_name)`**: This decorator logs entry and exit points of the decorated function, grouping logs under a specified group name.

  1. code execution time

  ```python
  from codealchemy import code_execution_time

  @code_execution_time
  def example_function():
      import time
      time.sleep(2)
      print("Function executed")

  example_function()
  ```

  2. Log groups

  ```python

  from codealchemy import log_group
  import logging


  logging.getLogger(__name__).setLevel(logging.INFO)

  @log_group("MainGroup")
  def main_function():
      print("Inside main function")
      print("*"*20)
      logging.info("Inside main function")
      inner_function()

  @log_group("InnerGroup")
  def inner_function():
      print("Inside inner function")
      print("*"*20)
      logging.info("Inside inner function")
      innermost_function()

  @log_group("InnermostGroup")
  def innermost_function():
      print("Inside innermost function")
      print("*"*20)
      logging.info("Inside innermost function")
      print("Innermost function executed")

  main_function()
  ```

  ![image](https://github.com/user-attachments/assets/15495373-711d-4b72-9fbb-32acb80c110b)



  - **`kafkaUtils`**: A utility module that simplifies Kafka-related operations for Python developers.

  1. Kafka Producer:
     The Kafka producer sends messages to Kafka topics. Here's how you can use it:

     ```python
     from codealchemy import kafkaUtils

     config_file = "config.json"
     topic = "topic_name"

     producer = kafkaUtils.KafkaProducer(config_file, topic)


     print("\nProducing Messages to default partition:")
     
     for i in range(10):
         
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message(message)
     
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()


     print("\nProducing Messages to Particular partition:")
     
     for i in range(10):
         
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message(message, partition=1)
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()


     print("\nProducing Messages in Round Robin:")
     
     for i in range(10):
         message = {"key": i, "value": f"Test message {i}"}
         producer.send_message_round_robin(message)
     producer.flush()
     print("\nLatest offsets:")
     producer.display_partition_offsets()
     ```

  2. Kafka Consumer:
     The Kafka consumer consumes messages from Kafka topics. Here's how you can use it:

     ```python
     from codealchemy import kafkaUtils

     config_file = "config.json"
     topic = "topic_name"
     group_id = "group_id"

     auto_offset = "earliest"
      
      

     consumer = kafkaUtils.KafkaConsumer(config_file, topic, group_id, auto_offset)
     consumer.consume_messages()

     ```

     If you need to consume from particular offset

     ```python
     consumer = kafkaUtils.KafkaConsumer(config_file, topic, group_id, auto_offset, offset=10)
     consumer.consume_from_offset(offset=2350, partition=1)
     
     ```

     If you need to consume from particular timestamp

     ```python
     consumer = kafkaUtils.KafkaConsumer(config_file, topic, group_id, auto_offset, offset=10)
     consumer.consume_from_timestamp(timestamp="2024-11-13T22:39:00.999Z", partition=1)
     
     ```

     Sample `config.json`

     ```json
     {
       "bootstrap.servers": "kafkabroker:9093",
       "security.protocol": "SSL",
       "ssl.key.password": "Password@1",
       "ssl.certificate.location": "/etc/secrets/kafka/truststore.pem",
       "ssl.key.location": "/etc/secrets/kafka/keystore.pem",
       "ssl.ca.location": "/etc/secrets/kafka/caroot.pem"
     }
     ```



  This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.


pkgId: 7d13d82e99aa2a554a8de6722f4894ce8f765a49d66b47f1c95b6f4c6f15e9f7
name: python-codebase-digest
arch: src
version: 0.1.43
epoch: 0
release: 1
summary: Consolidates and analyzes codebases for insights.
url: https://github.com/kamilstanuch/codebase-digest
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-codebase-digest-0.1.43-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/codebase-digest.svg)](https://badge.fury.io/py/codebase-digest)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  Codebase Digest is a command-line tool written in Python that helps you analyze and understand your codebase. It provides a structured overview of your project's directory structure, file sizes, token counts, and even consolidates the content of all text-based files into a single output for easy analysis with Large Language Models (LLMs).

  ![Codebase Digest in action](codebase-digest.gif)



  - [Features](#features)
  - [Installation](#installation)
  - [Usage](#usage)
  - [Configuration](#configuration)
  - [Ignore Functionality](#ignore-functionality)
  - [LLM Prompts for Enhanced Analysis](#llm-prompts-for-enhanced-analysis)
  - [Contributing](#contributing)
  - [License](#license)



  - 📊 **Directory Tree Visualization:** Generate a hierarchical view of your project structure
  - 📈 **Codebase Statistics:** Calculate total files, directories, code size, and token counts
  - 📄 **File Content Consolidation:** Combine all text-based files into a single output
  - 🚫 **Flexible Ignore System:** Support for custom patterns, defaults, and `.gitignore` files
  - 🎨 **Multiple Output Formats:** Choose between text, JSON, Markdown, XML, or HTML
  - 🌈 **Colored Console Output:** Visually appealing and informative summaries
  - 🧠 **LLM Analysis Support:** Comprehensive prompt library for in-depth codebase analysis





  ```bash
  pip install codebase-digest
  ````




  ````bash
  git clone https://github.com/kamilstanuch/codebase-digest.git
  cd codebase-digest
  pip install -r requirements.txt
  ````




  Basic usage:

  ````bash
  cdigest [path_to_directory] [options]
  ````


  Examples:

  1. Analyze a project with default settings:
     ```bash
     cdigest /path/to/my_project
     ```

  2. Analyze with custom depth and output format:
     ```bash
     cdigest /path/to/my_project -d 3 -o markdown
     ```

  3. Ignore specific files and folders:
     ```bash
     cdigest /path/to/my_project --ignore "*.log" "temp_folder" "config.ini"
     ```

  4. Show file sizes and include git directory:
     ```bash
     cdigest /path/to/my_project --show-size --include-git
     ```

  5. Analyze and copy output to clipboard:
     ```bash
     cdigest /path/to/my_project --copy-to-clipboard
     ```



  | Option | Description |
  |--------|-------------|
  | `path_to_directory` | Path to the directory you want to analyze |
  | `-d, --max-depth` | Maximum depth for directory traversal |
  | `-o, --output-format` | Output format (text, json, markdown, xml, or html). Default: text |
  | `-f, --file` | Output file name |
  | `--show-size` | Show file sizes in directory tree |
  | `--show-ignored` | Show ignored files and directories in tree |
  | `--ignore` | Patterns to ignore (e.g., '*.pyc' '.venv' 'node_modules') |
  | `--keep-defaults` | Keep default ignore patterns when using --ignore |
  | `--no-content` | Exclude file contents from the output |
  | `--include-git` | Include .git directory in the analysis |
  | `--max-size` | Maximum allowed text content size in KB (default: 10240 KB) |
  | `--copy-to-clipboard` | Copy the output to clipboard |





  The following patterns are ignored by default:

  ```python
  DEFAULT_IGNORE_PATTERNS = [
  '.pyc', '.pyo', '.pyd', 'pycache', # Python
  'node_modules', 'bower_components', # JavaScript
  '.git', '.svn', '.hg', '.gitignore', # Version control
  'venv', '.venv', 'env', # Virtual environments
  '.idea', '.vscode', # IDEs
  '.log', '.bak', '.swp', '.tmp', # Temporary and log files
  '.DS_Store', # macOS
  'Thumbs.db', # Windows
  'build', 'dist', # Build directories
  '.egg-info', # Python egg info
  '.so', '.dylib', '.dll' # Compiled libraries
  ]
  ```



  You can specify additional patterns to ignore using the `--ignore` option. These patterns will be added to the default ignore patterns unless `--no-default-ignores` is used.

  Patterns can use wildcards (* and ?) and can be:
  - Filenames (e.g., 'file.txt')
  - Directory names (e.g., 'node_modules')
  - File extensions (e.g., '*.pyc')
  - Paths (e.g., '/path/to/ignore')

  Example:
  ```bash
  cdigest /path/to/my_project --ignore ".txt" "temp" "/path/to/specific/file.py"
  ```




  You can create a `.cdigestignore` file in your project root to specify project-specific ignore patterns. Each line in this file will be treated as an ignore pattern.



  To use only your custom ignore patterns without the default ones, use the `--no-default-ignores` option:

  ```bash
  cdigest /path/to/my_project --no-default-ignores --ignore "custom_pattern" "another_pattern"
  ```




  Codebase Digest includes a comprehensive set of prompts in the `prompt_library` directory to help you analyze your codebase using Large Language Models. These prompts cover various aspects of code analysis and business alignment:



  1. **Codebase Mapping and Learning**: Quickly understand the structure and functionality of a new or complex codebase.
  2. **Improving User Stories**: Analyze existing code to refine or generate user stories.
  3. **Initial Security Analysis**: Perform a preliminary security assessment.
  4. **Code Quality Enhancement**: Identify areas for improvement in code quality, readability, and maintainability.
  5. **Documentation Generation**: Automatically generate or improve codebase documentation.
  6. **Learning Tool**: Use as a teaching aid to explain complex coding concepts or architectures.
  7. **Business Alignment**: Analyze how the codebase supports business objectives.
  8. **Stakeholder Communication**: Generate insights to facilitate discussions with non-technical stakeholders.




  - **Analysis:**
      - [Codebase Error and Inconsistency Analysis](prompt_library/quality_error_analysis.md): Identify and analyze errors and inconsistencies in the codebase.
      - [Codebase Risk Assessment](prompt_library/quality_risk_assessment.md): Evaluate potential risks within the codebase (e.g., security vulnerabilities, maintainability issues).
      - [Code Complexity Analysis](prompt_library/quality_code_complexity_analysis.md): Identify areas with high cyclomatic complexity, deep nesting, or excessive method lengths.
      - [Code Duplication Analysis](prompt_library/quality_code_duplication_analysis.md): Identify duplicated code fragments and suggest refactoring opportunities.
      - [Code Style Consistency Analysis](prompt_library/quality_code_style_consistency_analysis.md): Analyze the codebase for consistency in code style, naming conventions, and formatting.
      - [Code Documentation Coverage Analysis](prompt_library/quality_code_documentation_coverage_analysis.md): Determine the coverage and quality of code documentation.
  - **Generation:**
      - [Codebase Documentation Generation](prompt_library/quality_documentation_generation.md): Automatically generate or improve codebase documentation.


  - **Analysis:**
      - [Frontend Code Analysis](prompt_library/learning_frontend_code_analysis.md): Analyze the frontend codebase to identify best practices, potential improvements, and common pitfalls.
      - [Backend Code Analysis](prompt_library/learning_backend_code_analysis.md): Analyze the backend codebase to identify best practices, potential improvements, and common pitfalls.
      - [Code Style and Readability Analysis](prompt_library/learning_code_style_readability_analysis.md): Evaluate the codebase's overall style and readability, providing suggestions for improvement.
      - [Personal Development Recommendations](prompt_library/learning_personal_development_recommendations.md): Analyze the codebase and provide personalized recommendations for areas where the engineer can improve their skills.
  - **Generation:**
      - [User Story Reconstruction from Code](prompt_library/learning_user_story_reconstruction.md): Reconstruct and structure user stories based on the codebase.
      - [Code-Based Mini-Lesson Generation](prompt_library/learning_mini_lesson_generation.md): Create mini-lessons to explain complex coding concepts or architectures.
      - [Algorithmic Storytelling](prompt_library/learning_algorithmic_storytelling.md): Generate engaging narratives that explain the logic and flow of key algorithms in the codebase.
      - [Code Pattern Recognition and Explanation](prompt_library/learning_code_pattern_recognition.md): Identify and explain design patterns, architectural patterns, and common coding idioms used in the codebase.
      - [Socratic Dialogue Generation for Code Review](prompt_library/learning_socratic_dialogue_code_review.md): Generate Socratic-style dialogues that explore the reasoning behind code design decisions and encourage critical thinking during code reviews.
      - [Code Evolution Visualization](prompt_library/learning_code_evolution_visualization.md): Create visualizations that illustrate how the codebase has evolved over time, highlighting key milestones, refactorings, and architectural changes.
      - [Codebase Trivia Game Generation](prompt_library/learning_codebase_trivia_game.md): Generate trivia questions and answers based on the codebase to gamify learning and encourage team engagement.
      - [Code-Inspired Analogies and Metaphors](prompt_library/learning_code_analogies_metaphors.md): Generate analogies and metaphors inspired by the codebase to help explain complex technical concepts to non-technical stakeholders.
      - [Frontend Component Documentation](prompt_library/learning_frontend_component_documentation.md): Generate documentation for frontend components, including props, usage examples, and best practices.
      - [Backend API Documentation](prompt_library/learning_backend_api_documentation.md): Generate documentation for backend APIs, including endpoints, request/response formats, and authentication requirements.
      - [Code Refactoring Exercises](prompt_library/learning_code_refactoring_exercises.md): Generate code refactoring exercises based on the codebase to help engineers improve their refactoring skills.
      - [Code Review Checklist Generation](prompt_library/learning_code_review_checklist.md): Generate a checklist of important points to consider during code reviews, based on the codebase's specific requirements and best practices.


  - **Analysis:**
      - [Codebase Best Practice Analysis](prompt_library/improvement_best_practice_analysis.md): Analyze the codebase for good and bad programming practices.
  - **Generation:**
      - [Codebase Translation to Another Programming Language](prompt_library/improvement_language_translation.md): Translate the codebase from one programming language to another.
      - [Codebase Refactoring for Improved Readability and Performance](prompt_library/improvement_refactoring.md): Suggest refactoring improvements for better readability and performance.


  - **Generation:**
      - [Unit Test Generation for Codebase](prompt_library/testing_unit_test_generation.md): Generate unit tests for the provided codebase.
  - **Analysis:**
      - [Security Vulnerability Analysis of Codebase](prompt_library/security_vulnerability_analysis.md): Identify potential security vulnerabilities in the codebase.


  - **Analysis:**
      - [Business Impact Analysis](prompt_library/business_impact_analysis.md): Identify key features and their potential business impact.
      - [SWOT Analysis](prompt_library/swot_analysis.md): Evaluate the codebase's current state and future potential.
      - [Jobs to be Done (JTBD) Analysis](prompt_library/jobs_to_be_done_analysis.md): Understand core user needs and identify potential improvements.
      - [OKR (Objectives and Key Results) Analysis](prompt_library/okr_analysis.md): Align codebase features with potential business objectives and key results.
      - [Value Chain Analysis](prompt_library/value_chain_analysis.md): Understand how the codebase supports the larger value creation process.
      - [Porter's Five Forces Analysis](prompt_library/porters_five_forces_analysis.md): Analyze competitive forces shaping the product's market.
      - [Product/Market Fit Analysis](prompt_library/product_market_fit_analysis.md): Evaluate how well the product meets market needs.
      - [PESTEL Analysis](prompt_library/pestel_analysis.md): Analyze macro-environmental factors affecting the product.
  - **Generation:**
      - [Business Model Canvas Generation](prompt_library/business_model_canvas_analysis.md): Create a Business Model Canvas based on codebase analysis.
      - [Value Proposition Canvas Generation](prompt_library/value_proposition_canvas_analysis.md): Generate a Value Proposition Canvas aligning technical features with user needs and benefits.
      - [Lean Canvas Generation](prompt_library/lean_canvas_analysis.md): Create a Lean Canvas to evaluate business potential and identify areas for improvement or pivot.
      - [Customer Journey Map Creation](prompt_library/customer_journey_map_analysis.md): Generate a map showing how different parts support various stages of the user's journey.
      - [Blue Ocean Strategy Canvas](prompt_library/blue_ocean_strategy_analysis.md): Create a strategy canvas to identify untapped market space and new demand.
      - [Ansoff Matrix Generation](prompt_library/ansoff_matrix_analysis.md): Produce an Ansoff Matrix to evaluate growth strategies for the product.
      - [BCG Growth-Share Matrix Creation](prompt_library/bcg_matrix_analysis.md): Generate a BCG Matrix to assess the product portfolio and resource allocation.
      - [Kano Model Diagram](prompt_library/kano_model_analysis.md): Create a Kano Model diagram to prioritize product features based on customer satisfaction.
      - [Technology Adoption Lifecycle Curve](prompt_library/tech_adoption_lifecycle_analysis.md): Generate a curve showing the product's position in the adoption lifecycle.
      - [Competitive Positioning Map](prompt_library/competitive_positioning_map.md): Create a visual map of the product's position relative to competitors.
      - [McKinsey 7S Framework Diagram](prompt_library/mckinsey_7s_analysis.md): Generate a diagram evaluating internal elements for organizational effectiveness.
      - [Stakeholder Persona Generation](prompt_library/stakeholder_persona_generation.md): Infer and create potential stakeholder personas based on codebase functionalities.


  - **Analysis:**
      - [Identify Architectural Layers](prompt_library/architecture_layer_identification.md): Analyze the codebase and identify different architectural layers (e.g., presentation, business logic, data access), highlighting inconsistencies or deviations from common architectural patterns.
      - [Analyze Coupling and Cohesion](prompt_library/architecture_coupling_cohesion_analysis.md): Evaluate coupling and cohesion between modules or components, identifying areas with high coupling or low cohesion that might indicate design flaws.
      - [Identify Design Patterns](prompt_library/architecture_design_pattern_identification.md): Analyze the codebase for instances of common design patterns (e.g., Singleton, Factory, Observer), explaining their implementation and purpose.
      - [Database Schema Review](prompt_library/architecture_database_schema_review.md): Review the database schema for normalization, indexing, and potential performance bottlenecks, suggesting improvements based on best practices.
      - [API Conformance Check](prompt_library/architecture_api_conformance_check.md): Given an API specification (e.g., OpenAPI), analyze the codebase to identify any inconsistencies or deviations from the defined API contract.
  - **Generation:**
      - [Generate Architectural Diagram](prompt_library/architecture_diagram_generation.md): Based on codebase structure and dependencies, generate a visual representation of the system architecture, including components, layers, and interactions.
      - [Suggest Refactoring for Design Patterns](prompt_library/architecture_refactoring_for_design_patterns.md): Analyze the codebase and suggest opportunities to implement design patterns for improved maintainability, extensibility, or reusability.
      - [Generate Database Schema Documentation](prompt_library/architecture_database_schema_documentation.md): Create comprehensive documentation for the database schema, including table descriptions, relationships, indexes, and constraints.
      - [Generate API Client Code](prompt_library/architecture_api_client_code_generation.md): Based on an existing API specification or codebase implementation, generate client code (e.g., in JavaScript, Python) to interact with the API.


  - **Analysis:**
      - [Identify Performance Bottlenecks](prompt_library/performance_bottleneck_identification.md): Analyze the codebase for performance bottlenecks like inefficient algorithms, excessive database queries, or slow network requests, focusing specifically on performance-related issues.
      - [Resource Usage Profiling](prompt_library/performance_resource_usage_profiling.md): Analyze the codebase to identify areas with high CPU utilization, memory consumption, or disk I/O, providing insights into potential optimizations for efficient resource usage.
      - [Scalability Analysis](prompt_library/performance_scalability_analysis.md): Analyze the codebase and architectural choices to assess the system's scalability, identifying potential limitations and suggesting improvements for handling increased load.
      - [Concurrency and Synchronization Analysis](prompt_library/performance_concurrency_synchronization_analysis.md): Analyze the codebase for potential concurrency issues like race conditions or deadlocks. Suggest solutions to improve thread safety and synchronization mechanisms.
  - **Generation:**
      - [Suggest Code Optimization Techniques](prompt_library/performance_code_optimization_suggestions.md): Based on the analysis of potential bottlenecks, suggest specific code optimization techniques like caching, asynchronous operations, or algorithm improvements.
      - [Generate Performance Test Scenarios](prompt_library/performance_test_scenario_generation.md): Create realistic performance test scenarios (e.g., using tools like JMeter or Gatling) to simulate high load and identify performance bottlenecks.
      - [Suggest Configuration Tuning](prompt_library/performance_configuration_tuning.md): Recommend optimal configuration settings for databases, application servers, or other infrastructure components to improve performance.


  - **Analysis:**
      - [Code Churn Hotspot Analysis](prompt_library/evolution_code_churn_hotspot_analysis.md): Analyze code commit history to identify areas of the codebase with high churn rates, which can indicate areas requiring refactoring or potentially problematic code.
      - [Technical Debt Estimation](prompt_library/evolution_technical_debt_estimation.md): Based on code complexity, code smells, and other factors, estimate the amount of technical debt present in the codebase and prioritize areas for refactoring. Focus on estimations derived from historical code analysis rather than general code quality.
      - [Impact Analysis of Code Changes](prompt_library/evolution_impact_analysis_of_code_changes.md): Analyze the potential impact of specific code changes (e.g., bug fixes, new features) on other parts of the system to identify potential regressions or conflicts.
  - **Generation:**
      - [Generate Code Evolution Report](prompt_library/evolution_code_evolution_report_generation.md): Create a report summarizing the evolution of the codebase over time, including key metrics like code churn, code complexity, and contributor activity.
      - [Generate Refactoring Recommendations (History-Based)](prompt_library/evolution_refactoring_recommendation_generation.md): Based on code evolution analysis and technical debt estimation, generate specific refactoring recommendations to improve code quality and reduce maintenance costs, focusing on areas identified through historical analysis.
      - [Visualize Codebase Evolution](prompt_library/evolution_codebase_evolution_visualization.md): Generate visualizations (e.g., heatmaps, graphs) to represent the codebase's evolution, highlighting areas of frequent change, code complexity, and potential technical debt.



  For detailed instructions on using these prompts, refer to the individual files in the `prompt_library` directory.



  Contributions are welcome! Please feel free to submit a Pull Request.



  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


