{"id":23070065,"url":"https://github.com/finbourne/lusid-sdk-python","last_synced_at":"2025-04-09T07:09:33.025Z","repository":{"id":37451203,"uuid":"125082278","full_name":"finbourne/lusid-sdk-python","owner":"finbourne","description":"Python SDK for LUSID by FINBOURNE, a bi-temporal investment management data platform with portfolio accounting capabilities.","archived":false,"fork":false,"pushed_at":"2025-04-04T12:49:48.000Z","size":583110,"stargazers_count":11,"open_issues_count":7,"forks_count":12,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-07T09:15:26.298Z","etag":null,"topics":["bi-temporal","data-platform","finbourne","fintech","lusid","openapi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finbourne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-13T16:31:54.000Z","updated_at":"2025-04-04T12:49:52.000Z","dependencies_parsed_at":"2023-10-14T14:03:29.416Z","dependency_job_id":"b7c61f86-04e0-4cf2-98cd-e17b6b0176ca","html_url":"https://github.com/finbourne/lusid-sdk-python","commit_stats":{"total_commits":7720,"total_committers":28,"mean_commits":275.7142857142857,"dds":"0.025000000000000022","last_synced_commit":"a392ed1a91e4f5a46af1f5237844fdd30d2c490f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finbourne%2Flusid-sdk-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finbourne%2Flusid-sdk-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finbourne%2Flusid-sdk-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finbourne%2Flusid-sdk-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finbourne","download_url":"https://codeload.github.com/finbourne/lusid-sdk-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622988,"owners_count":20968575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bi-temporal","data-platform","finbourne","fintech","lusid","openapi","python"],"created_at":"2024-12-16T06:19:04.460Z","updated_at":"2025-04-09T07:09:33.012Z","avatar_url":"https://github.com/finbourne.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![LUSID_by_Finbourne](./resources/Finbourne_Logo_Teal.svg)\n\n# Python SDK for the LUSID API\n\n## Contents\n\n- [Summary](#summary)\n- [Versions](#versions)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n    * [Environment variables](#environment-variables)\n    * [Secrets file](#secrets-file)\n    * [Example](#example)\n- [Endpoints and models](#endpoints-and-models)\n\n## Summary\n\nThis is the python SDK for the LUSID API, part of the [LUSID by FINBOURNE](https://www.finbourne.com/lusid-technology) platform. To use it you'll need a LUSID account - [sign up for free at lusid.com](https://www.lusid.com/app/signup).\n\nLUSID is a bi-temporal investment management data platform with portfolio accounting capabilities - see https://support.lusid.com/knowledgebase/ to learn more.\n\nFor more details on other applications in the LUSID platform, see [Understanding all the applications in the LUSID platform](https://support.lusid.com/knowledgebase/article/KA-01787).\n\nThis sdk supports `Production`, `Early Access`, `Beta` and `Experimental` API endpoints. For more details on API endpoint categories, see [What is the LUSID feature release lifecycle](https://support.lusid.com/knowledgebase/article/KA-01786). To find out which category an API endpoint falls into, see the [swagger page](https://www.lusid.com/api/swagger/index.html).\n\nThis code is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project.\n\n## Versions\n\n- API version: 0.11.7670\n- SDK version: 2.1.762\n\n## Requirements\n\n- Python 3.7+\n\n## Installation\n\nIf using [poetry](https://python-poetry.org/docs/)\n\n```\npoetry add lusid-sdk\n```\n\nIf using [pip](https://pypi.org/project/pip/)\n\n```\npip install lusid-sdk\n```\n\nThen import the package in your python file\n```python\nimport lusid\n```\n\n## Getting Started\n\nYou'll need to provide some configuration to connect to the LUSID API - see the articles about [short-lived access tokens](https://support.lusid.com/knowledgebase/article/KA-01654) and a [long-lived Personal Access Token](https://support.lusid.com/knowledgebase/article/KA-01774). This configuration can be provided using a secrets file or environment variables.\n\nFor some configuration it is also possible to override the global configuration at the ApiClientFactory level, or at the request level. For the set of configuration which can be overridden, please see [ConfigurationOptions](sdk/lusid/extensions/configuration_options.py). For a code illustration of this configuration being overridden, please see the [example](#example).\n\n### Environment variables\n\nRequired for a short-lived access token\n``` \nFBN_TOKEN_URL\nFBN_LUSID_URL\nFBN_USERNAME\nFBN_PASSWORD\nFBN_CLIENT_ID\nFBN_CLIENT_SECRET\n```\n\nRequired for a long-lived access token\n``` \nFBN_LUSID_URL\nFBN_ACCESS_TOKEN\n```\n\nYou can send your requests to the LUSID API via a proxy, by setting `FBN_PROXY_ADDRESS`. If your proxy has basic auth enabled, you must also set `FBN_PROXY_USERNAME` and `FBN_PROXY_PASSWORD`.\n\nOther optional configuration\n\n```bash\n# sdk client timeouts in milliseconds - a value of 0 means no timeout, otherwise timeout values must be a positive integer\n# please note - the chances of seeing a network issue increase with the duration of the request\n# for this reason, rather than increasing the timeout, it will be more reliable to use an alternate polling style endpoint where these exist\nFBN_TOTAL_TIMEOUT_MS # the default is 1800000 (30 minutes)\nFBN_CONNECT_TIMEOUT_MS # the default is 0 (no timeout)\nFBN_READ_TIMEOUT_MS # the default is 0 (no timeout)\nFBN_RATE_LIMIT_RETRIES # the default is 2\n```\n\n### Secrets file\n\nThe secrets file must be in the current working directory. By default the SDK looks for a secrets file called `secrets.json`\n\nRequired for a short-lived access token\n```json\n{\n    \"api\":\n    {\n        \"tokenUrl\":\"\u003cyour-token-url\u003e\",\n        \"lusidUrl\":\"https://\u003cyour-domain\u003e.lusid.com/api\",\n        \"username\":\"\u003cyour-username\u003e\",\n        \"password\":\"\u003cyour-password\u003e\",\n        \"clientId\":\"\u003cyour-client-id\u003e\",\n        \"clientSecret\":\"\u003cyour-client-secret\u003e\",\n    }\n}\n```\n\nRequired for a long-lived access token\n```json\n{\n    \"api\":\n    {\n        \"lusidUrl\":\"https://\u003cyour-domain\u003e.lusid.com/api\",\n        \"accessToken\":\"\u003cyour-access-token\u003e\"\n    }\n}\n```\n\nYou can send your requests to the LUSID API via a proxy, by adding a proxy section. If your proxy has basic auth enabled, you must also supply a `username` and `password` in this section.\n\n```json\n{\n    \"api\":\n    {\n        \"lusidUrl\":\"https://\u003cyour-domain\u003e.lusid.com/api\",\n        \"accessToken\":\"\u003cyour-access-token\u003e\"\n    },\n    \"proxy\":\n    {\n        \"address\":\"\u003cyour-proxy-address\u003e\",\n        \"username\":\"\u003cyour-proxy-username\u003e\",\n        \"password\":\"\u003cyour-proxy-password\u003e\"\n    }\n}\n```\n\nOther optional configuration\n\n```javascript\n{\n    \"api\": \n    {\n        // sdk client timeouts in milliseconds - a value of 0 means no timeout, otherwise timeout values must be a positive integer\n        // please note - the chances of seeing a network issue increase with the duration of the request\n        // for this reason, rather than increasing the timeout, it will be more reliable to use an alternate polling style endpoint where these exist\n        \"totalTimeoutMs\":\u003ctimeout-in-ms\u003e, // the default is 1800000 (30 minutes)\n        \"connectTimeoutMs\":\u003ctimeout-in-ms\u003e, // the default is 0 (no timeout)\n        \"readTimeoutMs\":\u003ctimeout-in-ms\u003e, // the default is 0 (no timeout)\n        \"rateLimitRetries\":\u003cretries-when-being-rate-limited\u003e // the default is 2\n    }\n}\n```\n\n### Example\n```python\nfrom lusid.exceptions import ApiException\nfrom lusid.extensions.configuration_options import ConfigurationOptions\nfrom lusid.models import *\nfrom pprint import pprint\nfrom lusid import (\n    SyncApiClientFactory,\n    AborApi\n)\n\ndef main():\n\n    with open(\"secrets.json\", \"w\") as file:\n        file.write('''\n    {\n        \"api\":\n        {\n            \"tokenUrl\":\"\u003cyour-token-url\u003e\",\n            \"lusidUrl\":\"https://\u003cyour-domain\u003e.lusid.com/api\",\n            \"username\":\"\u003cyour-username\u003e\",\n            \"password\":\"\u003cyour-password\u003e\",\n            \"clientId\":\"\u003cyour-client-id\u003e\",\n            \"clientSecret\":\"\u003cyour-client-secret\u003e\"\n        }\n    }''')\n\n    # Use the lusid SyncApiClientFactory to build Api instances with a configured api client\n    # By default this will read config from environment variables\n    # Then from a secrets.json file found in the current working directory\n\n    # uncomment the below to use configuration overrides\n    # opts = ConfigurationOptions();\n    # opts.total_timeout_ms = 30_000\n\n    # uncomment the below to use an api client factory with overrides\n    # api_client_factory = SyncApiClientFactory(opts=opts)\n\n    api_client_factory = SyncApiClientFactory()\n\n    # Enter a context with an instance of the SyncApiClientFactory to ensure the connection pool is closed after use\n    \n    # Create an instance of the API class\n    api_instance = api_client_factory.build(AborApi)\n    scope = 'scope_example' # str | The scope of the Abor.\n    code = 'code_example' # str | The code of the Abor.\n\n    # Objects can be created either via the class constructor, or using the 'from_dict' or 'from_json' methods\n    # Change the lines below to switch approach\n    # diary_entry_request = DiaryEntryRequest.from_json(\"\")\n    # diary_entry_request = DiaryEntryRequest.from_dict({})\n    diary_entry_request = DiaryEntryRequest()\n\n    try:\n        # uncomment the below to set overrides at the request level\n        # api_response =  api_instance.add_diary_entry(scope, code, diary_entry_request, opts=opts)\n\n        # [EXPERIMENTAL] AddDiaryEntry: Add a diary entry to the specified Abor.\n        api_response = api_instance.add_diary_entry(scope, code, diary_entry_request)\n        pprint(api_response)\n\n    except ApiException as e:\n        print(\"Exception when calling AborApi-\u003eadd_diary_entry: %s\\n\" % e)\n\nmain()\n```\n\n\n## Endpoints and models\n\n- See [Documentation for API Endpoints](sdk/README.md#documentation-for-api-endpoints) for a description of each endpoint\n- See [Documentation for Models](sdk/README.md#documentation-for-models) for descriptions of the models used\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinbourne%2Flusid-sdk-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinbourne%2Flusid-sdk-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinbourne%2Flusid-sdk-python/lists"}