Skip to main content

Cat structured data , in style

Project description

dotcat: Cat Structured Data, in Style

Dealing with structured data in shell scripts is all but impossible. dotcat gives you the ability to fetch structured data as easily as using cat it.

# Access data by attribute path
dotcat data.json person.name.first
# John
dotcat data.json person.name.last
# Doe

# Controle your output format
dotcat data.json person.name --output=yaml
# name:
#   first: John
#   last: Doe
dotcat data.json person.name --output=json
# {"first": "John", "last": "Doe"}

# List access
dotcat data.json person.friends@0
# {"name":{"first": "Alice", "last": "Smith"}, "age": 25} -> item access
dotcat data.json person.friends@2:4
# [{"name":{"first": "Alice", "last": "Smith"}, "age": 25}, {"name":{"first": "Bob", "last": "Johnson"}, "age": 30}]  -> slice access
dotcat data.json person.friends@4:-1
# ... from 5th to last item

The good times are here

Easily read values from JSON, YAML, TOML, and INI files without complex scripting or manual parsing.

Access deeply nested values using intuitive dot-separated paths (e.g., person.first.name) while controlling the output format with --output flag.

Dotcat is a good unix citizen with well structured exit codes so it can take part of your command pipeline like cat or grep would.

Installation

If you have a global pip install, this will install dotcat globally:

pip install dotcat

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

dotcat-0.8.20.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

dotcat-0.8.20-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file dotcat-0.8.20.tar.gz.

File metadata

  • Download URL: dotcat-0.8.20.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for dotcat-0.8.20.tar.gz
Algorithm Hash digest
SHA256 025d795ee876afc9b3bf5d5ae76c07b29a86daaa2e56ecf998812dfbb8cabd09
MD5 0ddd740176525457a4e193ea813f3755
BLAKE2b-256 907b929c5854b93e1af96b86c87f3783af19dcb618852caa923d6940da853a10

See more details on using hashes here.

File details

Details for the file dotcat-0.8.20-py3-none-any.whl.

File metadata

  • Download URL: dotcat-0.8.20-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for dotcat-0.8.20-py3-none-any.whl
Algorithm Hash digest
SHA256 77d91c84adaaa6f05c002a40db6ca610e38f1a7cd4f47d3f2f29adfe47706495
MD5 df4bb42b02ceb4d649b19a57f8979c5a
BLAKE2b-256 7c0db1d61176e58a535b2c67e69c59e0aa08a76ba2ab48a0987cb947cde69ffd

See more details on using hashes here.

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