Symphony BDK for Python
This is the Symphony BDK for Python to help develop bots and interact with the Symphony REST APIs.
Project Overview
Symphony BDK for Python provides tools for building bots and integrating with Symphony APIs. This document outlines its usage, installation, and contribution guidelines.
Prerequisites
- Python 3.9 or higher
- Poetry
Installation Steps
Option 1: Build from Source
- Install dependencies:
poetry install - Build the package:
poetry build - Run tests:
poetry run pytest - Perform a lint scan locally:
poetry run ruff check . - Format code locally:
poetry run ruff format . - Generate documentation locally:
cd docsrc && make html
Setting Up Git Hooks
This project uses pre-commit with ruff to automatically format and lint code. This is the recommended setup for contributors to ensure code style consistency.
- Install development dependencies (this will also install
pre--commitandruff):poetry install - Install the git hooks:
poetry run pre-commit install
Now, ruff will automatically run on every commit, formatting your code and checking for linting errors.
Verification
Verify the successful installation by running any of the following commands:
poetry --version
External Documents
Refer to the following for additional guidance:
Roadmap
The next milestone is the 2.5.x, focused on delivering improvements and bug fixes.
Contributing
To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/fooBar - Read the Contribution Guidelines and Community Code of Conduct
- Commit changes:
git commit -am 'Add some fooBar' - Push changes:
git push origin feature/fooBar - Open a Pull Request.
NOTE: Ensure you have an active Individual Contributor License Agreement (ICLA) or Corporate Contribution License Agreement (CCLA) with FINOS.
For further inquiries, email help@finos.org.
Updating Generated Code
Python BDK uses OpenAPITools/openapi-generator to generate code. To update the generated code, follow these steps:
- Download desired version of openapi generator.
cd api_client_generation curl -L https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.14.0/openapi-generator-cli-7.14.0.jar -o openapi-generator-cli.jar
- Adjust the commit for which the code is generated(inside generate.sh script)
- Execute the generation script:
./generate.sh
- Commit and push the newly generated code along with the updated JAR file.
Note: There are a few files that are not replaced(EX. api_client.py), those files require some modifications after code is generated.
OLD Updating Generated Code (Deprecated)
Python BDK uses OpenAPITools/openapi-generator to generate code. To update the generated code, follow these steps:
- Checkout the latest branch of the fork (e.g., sym-python-5.5.0).
- Update the fork source code, review, and merge it.
- Generate the JAR file in
openapi-generatormodules/openapi-generator-cli/target/openapi-generator-cli.jar:- Use Maven:
mvn clean install -Dmaven.test.skip=true && mvn clean package -Dmaven.test.skip=true
- Alternatively, use IntelliJ's build button to build the project and generate the JAR file.
- Use Maven:
- Copy the JAR file to the Python BDK repository:
symphony-api-client-python/api_client_generation/openapi-generator-cli.jar. - Execute the generation script:
./generate.sh
- Commit and push the newly generated code along with the updated JAR file.
License
Copyright 2021 Symphony LLC
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0.
Metadata
Release files for symphony_bdk_python 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| symphony_bdk_python-3.0.0.tar.gz | 274.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| symphony_bdk_python-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / symphony_bdk_python-3.0.0.tar.gz
| Download URL | symphony_bdk_python-3.0.0.tar.gz |
|---|---|
| Size | 274.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
388124a4e422414621dc6906aaaf6c54e2402f1b78cef8b6a0762fc5add26621
|
|
BLAKE2b-256 checksum How to use checksums |
8d7ac94ac906e3e092e187b316cc54046d809c256ad491cb3c34f9e20aa409aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.9.25 Linux/6.17.0-1022-azure
|
Release files / symphony_bdk_python-3.0.0-py3-none-any.whl
| Download URL | symphony_bdk_python-3.0.0-py3-none-any.whl |
|---|---|
| Size | 854.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a1fae13912fc9b487a208932e6dbf740c9ce69065ee26981fd52d0161579aab
|
|
BLAKE2b-256 checksum How to use checksums |
6abb5cf3e6b0acfe72a704221986c99226fb0b58decbad4c3bcb8da4547db8bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.9.25 Linux/6.17.0-1022-azure
|