app-common-python
=================
Simple client access library for the config for the Clowder operator.
Usage
-----
To access configuration, see the following example
```python
from app_common_python import LoadedConfig, isClowderEnabled
def main():
if isClowderEnabled():
print(f"Public Port: {LoadedConfig.PublicPort}")
```
The ``clowder`` library also comes with several other helpers
* ``LoadedConfig.rds_ca()`` - creates a temporary file with the RDSCa and
returns the filename.
* ``LoadedConfig.kafka_ca()`` - creates a temporary file with the KafkaCa and
returns the filename from the frist broker in the list.
* ``KafkaTopics`` - returns a map of KafkaTopics using the requestedName
as the key and the topic object as the value.
* ``KafkaServers`` - returns a list of Kafka Broker URLs.
* ``ObjectBuckets`` - returns a list of ObjectBuckets using the requestedName
as the key and the bucket object as the value.
* ``DependencyEndpoints`` - returns a nested map using \[appName\]\[deploymentName\]
for the public services of requested applications.
* ``PrivateDependencyEndpoints`` - returns a nested map using \[appName\]\[deploymentName\]
for the private services of requested applications.
Testing
-------
``ACG_CONFIG="test.json" pytest``
Raw data
{
"_id": null,
"home_page": "https://github.com/RedHatInsights/app-common-python",
"name": "app-common-python",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "psavage@redhat.com",
"download_url": "https://files.pythonhosted.org/packages/f1/3c/489edd05e007b8a8be2e0d0831b1cdf3ad5f22dff27392221eb9935aa49b/app-common-python-0.2.6.tar.gz",
"platform": null,
"description": "app-common-python\n=================\n\nSimple client access library for the config for the Clowder operator.\n\nUsage\n-----\n\nTo access configuration, see the following example\n\n```python\nfrom app_common_python import LoadedConfig, isClowderEnabled\n\ndef main():\n if isClowderEnabled():\n print(f\"Public Port: {LoadedConfig.PublicPort}\")\n```\n\nThe ``clowder`` library also comes with several other helpers\n\n* ``LoadedConfig.rds_ca()`` - creates a temporary file with the RDSCa and\n returns the filename.\n* ``LoadedConfig.kafka_ca()`` - creates a temporary file with the KafkaCa and\n returns the filename from the frist broker in the list.\n* ``KafkaTopics`` - returns a map of KafkaTopics using the requestedName\n as the key and the topic object as the value.\n* ``KafkaServers`` - returns a list of Kafka Broker URLs.\n* ``ObjectBuckets`` - returns a list of ObjectBuckets using the requestedName\n as the key and the bucket object as the value.\n* ``DependencyEndpoints`` - returns a nested map using \\[appName\\]\\[deploymentName\\]\n for the public services of requested applications.\n* ``PrivateDependencyEndpoints`` - returns a nested map using \\[appName\\]\\[deploymentName\\]\n for the private services of requested applications.\n\nTesting\n-------\n\n``ACG_CONFIG=\"test.json\" pytest``\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.2.6",
"project_urls": {
"Homepage": "https://github.com/RedHatInsights/app-common-python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f8c27792f90ce37c7d6f4be9b8d847f17d51dde875ae9daa475ba6f83b30c3f",
"md5": "417388d32aba770b0a3a7a356a49e056",
"sha256": "ae9e914d808d73be4694f53fcab88dcde19b1c4f0187b4a30909cd40cf12e939"
},
"downloads": -1,
"filename": "app_common_python-0.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "417388d32aba770b0a3a7a356a49e056",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4764,
"upload_time": "2023-07-26T12:26:05",
"upload_time_iso_8601": "2023-07-26T12:26:05.845838Z",
"url": "https://files.pythonhosted.org/packages/6f/8c/27792f90ce37c7d6f4be9b8d847f17d51dde875ae9daa475ba6f83b30c3f/app_common_python-0.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f13c489edd05e007b8a8be2e0d0831b1cdf3ad5f22dff27392221eb9935aa49b",
"md5": "d2f2678631a0b9ddaa00e2ef7f265a76",
"sha256": "d1a1f3f07ac51382d5986f79b1c2d47a063f0139889422db668431d1b9af0612"
},
"downloads": -1,
"filename": "app-common-python-0.2.6.tar.gz",
"has_sig": false,
"md5_digest": "d2f2678631a0b9ddaa00e2ef7f265a76",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8205,
"upload_time": "2023-07-26T12:26:07",
"upload_time_iso_8601": "2023-07-26T12:26:07.262962Z",
"url": "https://files.pythonhosted.org/packages/f1/3c/489edd05e007b8a8be2e0d0831b1cdf3ad5f22dff27392221eb9935aa49b/app-common-python-0.2.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-26 12:26:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RedHatInsights",
"github_project": "app-common-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "app-common-python"
}