Skip to main content

JSON Composer

Project description

jose5

JSON Composer

The fifth José in Aplazame

Example

The following file, dev.json ...

{
    "__extends": "./base.json",
    "__variables": {
        "ENVIRONMENT": "dev",
        "tfstate": {
            "with": {
                "stuff": 42
            }
        }
    },
    "environment": [
        {
            "name": "LOG_LEVEL",
            "value": "DEBUG"
        },
        {
            "name": "EXTRA_DEVELOPMENT_PARAM",
            "value": 20
        },
        {
            "name": "TFSTATE_STUFF",
            "value": "${tfstate.with.stuff}"
        }
    ],
    "secrets": [
        {
            "name": "SECRET_KEY",
            "valueFrom": "${PARAM_BASE_PATH}/SECRET_KEY"
        }
    ],
    "mergemap": {
        "b": "dev",
        "c": "dev"
    },
    "list": "${LIST_TEST}",
    "map": "${LIST_MAP}"
}

... with base.json

{
    "__variables": {
        "PARAM_BASE_PATH": "/app/${ENVIRONMENT}",
        "LIST_TEST": [
            1,
            2,
            3
        ],
        "LIST_MAP": {
            "a": 44
        }
    },
    "environment": [
        {
            "name": "ENVIRONMENT",
            "value": "${ENVIRONMENT}"
        },
        {
            "name": "LOG_LEVEL",
            "value": "INFO"
        }
    ],
    "mergemap": {
        "a": "base",
        "b": "base"
    }
}

... produces this result

{
  "environment": [
    {
      "name": "ENVIRONMENT",
      "value": "dev"
    },
    {
      "name": "LOG_LEVEL",
      "value": "DEBUG"
    },
    {
      "name": "EXTRA_DEVELOPMENT_PARAM",
      "value": 20
    },
    {
      "name": "TFSTATE_STUFF",
      "value": 42
    }
  ],
  "mergemap": {
    "a": "base",
    "b": "dev",
    "c": "dev"
  },
  "secrets": [
    {
      "name": "SECRET_KEY",
      "valueFrom": "/app/dev/SECRET_KEY"
    }
  ],
  "list": [
    1,
    2,
    3
  ],
  "map": {
    "a": 44
  }
}

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

jose5-0.4.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

jose5-0.4.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file jose5-0.4.0.tar.gz.

File metadata

  • Download URL: jose5-0.4.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10

File hashes

Hashes for jose5-0.4.0.tar.gz
Algorithm Hash digest
SHA256 84c9ec39c672955bf0a5b29cb85032de11ad63c40e077ff87c7542d979714e9f
MD5 fe0b6e3010a77f3d112aedcd8e5190e5
BLAKE2b-256 7949e3d6f27bb095bb209ad56961674c031a14f9a16c5866813ffd66422db6b8

See more details on using hashes here.

File details

Details for the file jose5-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: jose5-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.10

File hashes

Hashes for jose5-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e19935661343ec95387556e7b5361e9d6a8787a5c3ab032fdde745ceea97d81
MD5 ee488c3455b3ffdb1000e4bafc0025d2
BLAKE2b-256 571c45f0026927d07e5a006ecd8501a9e2223803a69a01d4b70b242a3aea7b61

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