Skip to main content

TODO

Project description

ujson5

GitHub Actions CI codecov python python python python pre-commit Code style: black Checked with mypy security: bandit License: MIT

Website

Setup development environment

  • Install poetry
  • poetry install --with dev
  • pre-commit install

TODOs

  • ruler implementation
  • CLI implementation
  • comments extraction
  • versioning docs using mike
  • add docstring examples
  • add optional arg to encode to cache comments in frozen or optimized mode
  • makefile automation

Comment Extraction Examples

courses = {
    # any comments before the dict entry belong to the entry
    "CS101": 93,
    # you can also add comments with multiple lines just like this one.
    # In this case, the comments in JSON5 will also be multi-line
    "ART101": 87,
    "HIS101": 65,  # a comment can also be in-line
}

# encoded json5
"""
{
    // any comments before the dict entry belong to the entry
    "CS101": 93,
    // you can also add comments with multiple lines just like this one.
    // In this case, the comments in JSON5 will also be multi-line
    "ART101": 87,
    "HIS101": 65,  // a comment can also be in-line
}
"""

class Courses(TypedDict, total=False):
    # you can also add comments in the TypedDict
    CS101: int
    # Multi-line comments are also supported
    # In this case, the comments in JSON5 will also be multi-line
    # The entries of dictionaries that implement this TypedDict will be commented
    ART101: int
    HIS101: int  # a comment can also be in-line
    # if a dictionary does not contain all the keys, only the keys that are
    # present will be commented
    LIT101: int

tom_courses: Courses = {
    "CS101": 93,
    "ART101": 87,
    # comments in dict will override the comments in TypedDict
    "HIS101": 65,  # in this case, HIS101 comments will be overridden
}

judy_courses: Courses = {
    "CS101": 93,
    "ART101": 87,
    "HIS101": 65,
    "LIT101": 78,
}


# encoded json5 for tom_courses
"""
{
    // you can also add comments in the TypedDict
    "CS101": 93,
    // Multi-line comments are also supported
    // In this case, the comments in JSON5 will also be multi-line
    // The entries of dictionaries that implement this TypedDict will be commented
    "ART101": 87,
    // comments in dict will override the comments in TypedDict
    "HIS101": 65,  // in this case, HIS101 comments will be overridden
}
"""

# encoded json5 for judy_courses
"""
{
    // you can also add comments in the TypedDict
    "CS101": 93,
    // Multi-line comments are also supported
    // In this case, the comments in JSON5 will also be multi-line
    // The entries of dictionaries that implement this TypedDict will be commented
    "ART101": 87,
    "HIS101": 65,  // a comment can also be in-line
    // if a dictionary does not contain all the keys, only the keys that are
    // present will be commented
    "LIT101": 78,
}
"""
check_list = [
    # list items can also be commented
    "apple",
    # indeed, multiple lines are allowed
    # just like this
    "banana",
    # you can also use a combination of block and inline comments
    "cherry",  # and inline comments are also supported
]

# encoded json5
"""
[
    // list items can also be commented
    "apple",
    // indeed, multiple lines are allowed
    // just like this
    "banana",
    // you can also use a combination of block and inline comments
    "cherry",  // and inline comments are also supported
]
"""

CLIs

  • poetry install --with [group]
  • poetry add --group [group] [dep]
  • mkdocs server

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

ujson5-0.0.1a0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

ujson5-0.0.1a0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file ujson5-0.0.1a0.tar.gz.

File metadata

  • Download URL: ujson5-0.0.1a0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ujson5-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 284128a1be506e871f851c57b2e3e2e2c96978743e3e152ea83955d8684e8868
MD5 0ebc1d496367f10065ae9030ae7ed4aa
BLAKE2b-256 501a766d08a21bb82b0d72a68344b55ff8c58c4871e8d62c87f52b1d316a82b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ujson5-0.0.1a0.tar.gz:

Publisher: release.yml on austinyu/ujson5

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

File details

Details for the file ujson5-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: ujson5-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ujson5-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad2417f912026df1288e487a72f43518fa182cf802b13b21e88d7fc3bde769cf
MD5 bf98b6c286b905cff59f81098cff4b9f
BLAKE2b-256 7a681d6d582bd9ce95330e127142bdafffccc003532bb73df6344726147e4378

See more details on using hashes here.

Provenance

The following attestation bundles were made for ujson5-0.0.1a0-py3-none-any.whl:

Publisher: release.yml on austinyu/ujson5

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