The `lib` library provides basic Python bindings for interacting with the Autocode standard library, enabling users to call functions from deployed Autocode services. It serves as a zero-dependency interface to execute StdLib functions and automatically generates Python SDKs for services deployed to Autocode. The current version is 4.0.0, and the project is actively maintained.
pip install libVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the `lib` object and make a call to an Autocode service. Service calls are dynamically accessed via `lib.<username>.<service_name>.<function_name>` or `lib.<username>.<service_name>` for default functions. It also shows basic error handling.
Review the official release notes and changelog for detailed breaking changes and migration steps when upgrading to version 4.0.0 or higher. Thoroughly test your application after upgrading.
Always wrap your `lib` calls in `try...except RuntimeError as err:` blocks to gracefully handle potential issues. Consult the Autocode documentation for specific error codes and messages from services.
Familiarize yourself with the Autocode ecosystem, including the Autocode CLI for service development and deployment, which can be found on the Autocode GitHub page.
It is highly recommended to use `lib` with a supported Python 3.x version (3.6+). If Python 2.x compatibility is critical, pin to an older `lib` version known to work or rigorously test your application against the specific `lib` version.
Install the library using pip: `pip install lib`
Verify your Autocode API key or token, ensure it has the correct scopes/permissions, and that it is correctly passed to the 'lib' client or service call. Regenerate the key if necessary.
Check the Autocode service's documentation or your deployed service's endpoint definitions to ensure the method name is correct and accessible. If using a generated SDK, regenerate it to reflect any changes.
Inspect the structure of the service response to confirm the exact key names. Use `.get()` with a default value or `try-except` blocks to handle potentially missing keys gracefully.
Refer to the Autocode service's API documentation or the generated SDK to ensure you are passing the correct number and types of arguments for the specific method being invoked.
No dependency data recorded yet.