Skip to main content

A simple package for a flag parsing

Project description

Flag library

Simple flag processing for Python

Supported types:

type implemented
int True
float True
str True
bool True
list True

Installation

$ pip install easy-flagger

Simple usage example

# python example.py -f 10.3
from flagger import Flagger

if __name__ == "__main__":
    flag = Flagger()
    f_flag = flag.parse_flag("-f", float)

    print(f_flag) # >> 10.3

List usage example

# python example.py -l 1,2,3
from flagger import Flagger

if __name__ == "__main__":
    flag = Flagger()
    l_flag = flag.parse_flag("-l", list, sep=",")

    print(l_flag) # >> ['1', '2', '3']

Checks flag for existence example

# python example.py --flag
from flagger import Flagger

if __name__ == "__main__":
    flag = Flagger()
    l_flag = flag.parse_flag("--flag")

    print(l_flag) # >> True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_flagger-1.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_flagger-1.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file easy_flagger-1.1.0.tar.gz.

File metadata

  • Download URL: easy_flagger-1.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for easy_flagger-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c49eaec5c84ff81446057990e7300cbded0e93939b65c7534d104a5d14f946a2
MD5 018857c1c08de6155c6670692a33fce0
BLAKE2b-256 4ff83e7164d24444eaf4b7782f24a7ea61b25a4bd7080c922ffc654e4ac841c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_flagger-1.1.0.tar.gz:

Publisher: release-action.yml on Doneeel/easy-flagger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easy_flagger-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: easy_flagger-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for easy_flagger-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4791cc30f85a33e6a091685aba312b0624fd4df6f6c51e33a94e203a191d728c
MD5 d72bb72ce711feb749edfec49c8ea418
BLAKE2b-256 ff9dbaef0c6da51406c947f834b964889051821b9fbb6cdda272bb759acec67b

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_flagger-1.1.0-py3-none-any.whl:

Publisher: release-action.yml on Doneeel/easy-flagger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page