https://github.com/jshwi/arcon
Persistent runtime config
https://github.com/jshwi/arcon
arguments config params parser runtime
Last synced: 10 months ago
JSON representation
Persistent runtime config
- Host: GitHub
- URL: https://github.com/jshwi/arcon
- Owner: jshwi
- License: mit
- Archived: true
- Created: 2022-11-15T02:30:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-20T12:31:07.000Z (over 1 year ago)
- Last Synced: 2025-03-04T04:29:57.484Z (12 months ago)
- Topics: arguments, config, params, parser, runtime
- Language: Python
- Homepage: https://arcon.readthedocs.io
- Size: 430 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Status: Archived
==================
This repository has been archived and is no longer maintained
arcon
=====
|Archive| |License| |PyPI| |CI| |CodeQL| |pre-commit.ci status| |codecov.io| |readthedocs.org| |python3.8| |Black| |isort| |docformatter| |pylint| |Security Status| |Known Vulnerabilities| |arcon|
.. |Archive| image:: https://img.shields.io/badge/status-inactive-red.svg
:target: https://img.shields.io/badge/status-inactive-red.svg
:alt: Status Inactive
.. |License| image:: https://img.shields.io/badge/License-MIT-yellow.svg
:target: https://opensource.org/licenses/MIT
:alt: License
.. |PyPI| image:: https://img.shields.io/pypi/v/arcon
:target: https://pypi.org/project/arcon/
:alt: PyPI
.. |CI| image:: https://github.com/jshwi/arcon/actions/workflows/build.yaml/badge.svg
:target: https://github.com/jshwi/arcon/actions/workflows/build.yaml
:alt: Build
.. |CodeQL| image:: https://github.com/jshwi/arcon/actions/workflows/codeql-analysis.yml/badge.svg
:target: https://github.com/jshwi/arcon/actions/workflows/codeql-analysis.yml
:alt: CodeQL
.. |pre-commit.ci status| image:: https://results.pre-commit.ci/badge/github/jshwi/arcon/master.svg
:target: https://results.pre-commit.ci/latest/github/jshwi/arcon/master
:alt: pre-commit.ci status
.. |codecov.io| image:: https://codecov.io/gh/jshwi/arcon/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jshwi/arcon
:alt: codecov.io
.. |readthedocs.org| image:: https://readthedocs.org/projects/arcon/badge/?version=latest
:target: https://arcon.readthedocs.io/en/latest/?badge=latest
:alt: readthedocs.org
.. |python3.8| image:: https://img.shields.io/badge/python-3.8-blue.svg
:target: https://www.python.org/downloads/release/python-380
:alt: python3.8
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Black
.. |isort| image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
:target: https://pycqa.github.io/isort/
:alt: isort
.. |docformatter| image:: https://img.shields.io/badge/%20formatter-docformatter-fedcba.svg
:target: https://github.com/PyCQA/docformatter
:alt: docformatter
.. |pylint| image:: https://img.shields.io/badge/linting-pylint-yellowgreen
:target: https://github.com/PyCQA/pylint
:alt: pylint
.. |Security Status| image:: https://img.shields.io/badge/security-bandit-yellow.svg
:target: https://github.com/PyCQA/bandit
:alt: Security Status
.. |Known Vulnerabilities| image:: https://snyk.io/test/github/jshwi/arcon/badge.svg
:target: https://snyk.io/test/github/jshwi/arcon/badge.svg
:alt: Known Vulnerabilities
.. |arcon| image:: https://snyk.io/advisor/python/docsig/badge.svg
:target: https://snyk.io/advisor/python/arcon
:alt: arcon
Persistent runtime config
-------------------------
Child class of ``argparse.ArgumentParser``
Includes version argument as a default
Default values are defined through pyproject.toml
Includes additional argument adding methods
.. code-block:: python
>>> __version__ = "0.1.0"
>>> from arcon import ArgumentParser
Parsing comma separated list
.. code-block:: python
>>> parser = ArgumentParser(__version__)
>>> parser.add_list_argument("-l", "--list")
>>> parser.parse_args(["--list", "comma,separated,list"])
Namespace(list=['comma', 'separated', 'list'])
Parsing dict of comma separated lists
.. code-block:: python
>>> parser = ArgumentParser(__version__)
>>> parser.add_dict_argument("-d", "--dict")
>>> parser.parse_args(["--dict", "key=comma,separated,list"])
Namespace(dict={'key': ['comma', 'separated', 'list']})