{"id":13937281,"url":"https://github.com/piranha/opster","last_synced_at":"2025-08-21T08:31:35.756Z","repository":{"id":57449357,"uuid":"2214668","full_name":"piranha/opster","owner":"piranha","description":"Command line parsing speedster","archived":false,"fork":false,"pushed_at":"2023-01-10T10:52:47.000Z","size":310,"stargazers_count":50,"open_issues_count":2,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-10T08:42:33.658Z","etag":null,"topics":["command-line-parser","python"],"latest_commit_sha":null,"homepage":"http://opster.rtfd.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piranha.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-16T08:37:41.000Z","updated_at":"2024-11-28T16:29:03.000Z","dependencies_parsed_at":"2023-02-08T18:15:34.941Z","dependency_job_id":null,"html_url":"https://github.com/piranha/opster","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piranha%2Fopster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piranha%2Fopster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piranha%2Fopster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piranha%2Fopster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piranha","download_url":"https://codeload.github.com/piranha/opster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230501172,"owners_count":18236061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-parser","python"],"created_at":"2024-08-07T23:03:27.725Z","updated_at":"2024-12-19T21:10:28.175Z","avatar_url":"https://github.com/piranha.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. -*- mode: rst -*-\n\n========\n Opster\n========\n\nOpster is a command line options parser, intended to make writing command line\napplications easy and painless. It uses built-in Python types (lists,\ndictionaries, etc) to define options, which makes configuration clear and\nconcise. Additionally it contains possibility to handle subcommands (i.e.\n``hg commit`` or ``svn update``).\n\n.. image:: https://github.com/piranha/opster/actions/workflows/build.yml/badge.svg\n   :target: https://github.com/piranha/opster/actions\n\n**Supported Python versions**: Python \u003e= 3.2\n\n\nQuick example\n-------------\n\nThat's an example of an option definition\n\n.. code:: python\n\n  import sys\n  from opster import command\n\n  @command()\n  def main(message,\n           no_newline=('n', False, \"don't print a newline\")):\n      '''Simple echo program'''\n      sys.stdout.write(message)\n      if not no_newline:\n          sys.stdout.write('\\n')\n\n  if __name__ == '__main__':\n      main.command()\n\nRunning this program will print help message::\n\n  \u003e ./echo.py\n  echo.py: invalid arguments\n  echo.py [OPTIONS] MESSAGE\n\n  Simple echo program\n\n  options:\n\n   -n --no-newline  don't print a newline\n   -h --help        show help\n\nAs you can see, here we have defined option to not print newline: keyword\nargument name is a long name for option, default value is a 3-tuple, containing\nshort name for an option (can be empty), default value (on base of which\nprocessing is applied - `see description`_) and a help string.\n\nUnderscores in long names of options are converted into dashes.\n\nIf you are calling a command with option using long name, you can supply it\npartially. In this case it could look like ``./echo.py --no-new``. This is also\ntrue for subcommands: read about them and everything else you'd like to know in\n`documentation`_.\n\n.. _documentation: http://opster.readthedocs.org/en/latest/\n.. _see description: http://opster.readthedocs.org/en/latest/overview.html#options-processing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiranha%2Fopster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiranha%2Fopster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiranha%2Fopster/lists"}