Skip to main content

Beutiful printer for arguments

Project description

# argstat Beautiful printer for arguments (argparse) inspired by youngnam

## Install ` $ pip install argstat `

## Example 1 ` >>> from argstat import Argstat # ① >>> import argparse >>> >>> parser = argparse.ArgumentParser() >>> input_args = parser.add_argument_group('Input args') >>> input_args.add_argument('--train_target', type=str, >>> default='C', choices=['C', 'C+E']) >>> input_args.add_argument('--test_target', type=str, >>> default='C', choices=['C', 'C+E']) >>> input_args.add_argument('--rec_size', type=int, default=111) >>> input_args.add_argument('--input_size', type=int, default=222) >>> input_args.add_argument('--num_vital', type=int, default=333) >>> input_args.add_argument('--cut_window', type=int, default=444) >>> input_args.add_argument('--skip_prob', type=float, default=555) >>> input_args.add_argument('--skip_mask', type=int, default=666) >>> input_args.add_argument('--target_vital', type=int, default=777) >>> >>> train_args = parser.add_argument_group('Train args') >>> train_args.add_argument('--num_epochs', type=int, default=888) >>> train_args.add_argument('--batch_size', type=int, default=999) >>> train_args.add_argument('--lr', type=float, default=0.1234) >>> >>> base_args = parser.add_argument_group('Base args') >>> base_args.add_argument('--save_path', type=str, default='test long path') >>> base_args.add_argument('--weight_path', type=str) >>> base_args.add_argument('--gpu', type=str, default='1234') >>> base_args.add_argument('--device', type=str) >>> base_args.add_argument('--mode', type=str, default='base', >>> choices=['base', 'single']) # ② >>> >>> argstat = Argstat(parser) >>> print (argstat) `

<img width=”250” alt=”screenshot” src=”https://user-images.githubusercontent.com/3329885/45678036-8eb8b100-bb70-11e8-8205-94c7dcd604a1.png”>

## Example 2 ` >>> ① ~ ② >>> argstat = Argstat(parser, False) >>> print (argstat) `

## Example 3 ` >>> ① ~ ② >>> from six.moves import cStringIO as StringIO >>> argstat = Argstat(parser) >>> print (argstat.print_to(StringIO(), False).getvalue()) `

## Example 4 ` >>> ① ~ ② >>> argstat = Argstat(parser) >>> print (argstat.jsonify()) `

## Example 5 ` >>> ① ~ ② >>> argstat = Argstat(parser) >>> with open("path","w") as fp: >>> argstat.print_to(fp, False) `

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

argstat-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

argstat-0.1.0-py2-none-any.whl (4.0 kB view details)

Uploaded Python 2

File details

Details for the file argstat-0.1.0.tar.gz.

File metadata

  • Download URL: argstat-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.10

File hashes

Hashes for argstat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a3e402a877d5e8381d811d0c9748f5ab38b53ac5f2a04e994871290ba759c12
MD5 9843f96653fd9fe2370a11718de95f46
BLAKE2b-256 27a55b26d2cccb8b7c07c065062b1d09271e9b20d4aa2050f4f4869bc3b8e8d2

See more details on using hashes here.

File details

Details for the file argstat-0.1.0-py2-none-any.whl.

File metadata

  • Download URL: argstat-0.1.0-py2-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.10

File hashes

Hashes for argstat-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 d693da29dc1fda18b3481f906d5c028136d86c84c172b3630345bf90684cc232
MD5 683d94b19726390f46a69de5d57e4e62
BLAKE2b-256 a6d81287056ae905090d4e5f1a6d4184128211e418ad3ab61af4c9969c0a9b53

See more details on using hashes here.

Supported by

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