Skip to main content

This package provides a simple output of python objects.

Project description

※下の方に日本語の説明があります

English description

This package provides a simple output of python objects.

How to use

from sout import sout

large_obj = [{j:"foo" for j in range(i+2)}
  for i in range(1000)]
sout(large_obj)

output

[
  {0: "foo", 1: "foo"},
  {0: "foo", 1: "foo", 2: "foo"},
  {0: "foo", 1: "foo", 2: "foo", 3: "foo"},
  {
    0: "foo",
    1: "foo",
    2: "foo",
    3: "foo",
    4: "foo"
  },
  {
    0: "foo",
    1: "foo",
    2: "foo",
    3: "foo",
    4: "foo",
    ... (all_n = 6)
  },
  ... (all_n = 1000)
]

日本語の説明

オブジェクトをわかりやすく表示するためのパッケージです

簡単な使い方

from sout import sout

large_obj = [{j:"foo" for j in range(i+2)}
  for i in range(1000)]
sout(large_obj)

出力結果

[
  {0: "foo", 1: "foo"},
  {0: "foo", 1: "foo", 2: "foo"},
  {0: "foo", 1: "foo", 2: "foo", 3: "foo"},
  {
    0: "foo",
    1: "foo",
    2: "foo",
    3: "foo",
    4: "foo"
  },
  {
    0: "foo",
    1: "foo",
    2: "foo",
    3: "foo",
    4: "foo",
    ... (all_n = 6)
  },
  ... (all_n = 1000)
]

備考

  • json-stock のDBやTableもわかりやすく表示することが可能です。
from sout import sout

sout(jst_db["test_table"]) # -> <json-stock Table {"test_key": "value"}>

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

sout-1.2.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

sout-1.2.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

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