unioslo / harborapi

Python async client for the Harbor REST API v2.0.
https://unioslo.github.io/harborapi/
MIT License
28 stars 5 forks source link

Commit code examples to repo #65

Open pederhan opened 1 year ago

pederhan commented 1 year ago

When writing the examples for the documentation, I have been saving them locally as separate files. I think it's useful to have code examples in the repository itself. Before I can commit my local files, I need to scrub them of all sensitive information and replace them with consistent os.getenv calls, which will allow all examples to be run with one set of environment variables (something like HARBOR_URL, HARBOR_USER, HARBOR_SECRET, etc.).

Additionally, the examples directory needs a README that suggests reading the actual documentation pages, because they provides additional context for each code example.