Package: curia
Curia Python SDKCuria Python SDK is a Python library for interacting with the Curia Platform.For detailed documentation, including the API reference, see our docs athttps://Curia-ai.github.io/curia-python-sdk/.Installing the Curia Python SDKThe Curia Python SDK is built to public PyPi and can be installed withpipas follows:pip install curiaYou can install from source by cloning this repository and utilizing poetry:git clone https://github.com/Curia-ai/curia-python-sdk.git
cd curia-python-sdk
poetry installSupported Operating SystemsCuria Python SDK supports Unix/Linux and Mac.Supported Python VersionsCuria Python SDK is tested on:Python 3.8Python 3.9Python 3.10Python 3.11Curia PermissionsThe Curia Python SDK requires a Curia API Token to access the Curia API. To access your API Token visit the instance
of the curia platform you are utilizing and access the developer settings, e.g. in prod:https://aledade.dev.curia.ai/settings/developerDevelopmentInstalling dependenciesWhile the Curia Python SDK supports Python 3.8+, we develop using Python 3.9. One of the easiest ways to install Python 3.9 is withpyenvpyenv install 3.9.7
pyenv local 3.9.7Curia Python SDK usesPoetryfor dependency management. We suggest installing poetry
through pipx. You can install pipx with Homebrew:brew install pipxOnce pipx is installed, you can install poetry:pipx install poetryOnce poetry is installed, you can install the dependencies for the Curia Python SDK.To install dependencies, run:poetry installTo install dependencies for development, run:poetry install --with=devPoe CommandsWe utilizePoe, a poetry plugin, to handle common tasks. To see a list of commands, run:poetry run poe --helpRunning testsTo run tests, run:poetry run poe testRunning lintingTo run linting, run:poetry run poe lintBuilding the SDKTo build the SDK, run:poetry run poe buildTo clean build artifacts and test artifactsTo clean build artifacts and test artifacts, run:poetry run poe cleanBuilding docsCuria Python SDK has Sphinx docs.
To build the docs, run:poetry run poe build-docsTo preview the site with a Python web server:cd docs/_build/html
python -m http.server 8000View the docs by visitinghttp://localhost:8080Manually using the Swagger CodegenPortions of the Curia Python SDK are generated using the Swagger Codegen. To manually regenerate the SDK, you will need
to install gnu-sed. Visithttps://medium.com/@bramblexu/install-gnu-sed-on-mac-os-and-set-it-as-default-7c17ef1b8f64to see how to install gnu-sed for consistency in fixing swagger importsexport PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"Once you have gnu-sed installed, you can run the following command to regenerate the SDK:poetry run poe swagger-codegen-prodto regenerate the SDK from the production environment, orpoetry run poe swagger-codegen-devto regenerate the SDK from the development environment.Cut your own release (not recommended)Sometimes we may have updates that are currently in the development environment,
but not accessible in production yet.  When this happens, the SDK will not reflect
the latest changes in develop.  To be able to use new features of the API, you can
cut a new release of the SDK and use the latest version.BE CAREFUL - MAKE SURE YOU KNOW WHY YOU ARE DOING THISTo cut a new release based on the Dev API, runpoetry run poe swagger-codegen-dev.  In order
to get some sed commands to work on Mac, you will need to install and useGnu-SedFirst, update the version insrc/curia/__init__.pyThen build the source distribution:poetry run poe buildMake sure you have twine installed:pip install twine.
Finally, upload the new distribution to pypi:python -m twine upload dist/*You will be prompted for a username and password.Your username is__token__Your password is stored in 1Password in the Curia vault in thePyPi Curia Projectsecure document