balena-io / balena-sdk-python

Balena SDK for Python
Apache License 2.0
67 stars 46 forks source link

Service environment variable name incorrect in Documentation (should be `var` not `env_var`) #330

Closed joel35 closed 1 year ago

joel35 commented 1 year ago

In the documentation relating to ServiceEnvVariable, the variable name provided in the documentation is env_var. The provided example is:

balena.models.service.env_var.get(1234,'test_env4')

However, this raises the following exception:

AttributeError: 'Service' object has no attribute 'env_var'

Looking at the source code, the correct variable name is var with an updated version of the example working correctly.

balena.models.service.var.get(1234,'test_env4')

This is the case for all documentation relating to ServiceEnvVariable objects.

The documentation should be updated to reflect the correct variable name.

otaviojacobi commented 1 year ago

Thanks for raising @joel35 I will fix the docs right away

otaviojacobi commented 1 year ago

Hello @joel35 I fixed the docs regarding this and added some more examples on how to set up Balena settings on #331

The docs website: https://docs.balena.io/reference/sdk/python-sdk/#examples-153 is also updated.