Metadata-Version: 1.1
Name: jdog
Version: 0.2.2
Summary: Just another Data Offline Generator
Home-page: https://github.com/petrnymsa/jdog
Author: Petr Nymsa
Author-email: nymsa.petr@outlook.cz
License: MIT
Description: .. image:: https://github.com/petrnymsa/jdog/workflows/build-test/badge.svg
        
        .. image:: https://readthedocs.org/projects/jdog/badge/?version=latest
        
        *********************************************
        Just another Data Offline Generator (JDOG) 🐶
        *********************************************
        
        🗎 `Full documentation <https://jdog.readthedocs.io/en/latest/>`_.
        
        .. start-inclusion-marker-do-not-remove
        
        - JDOG is Python library which helps generate sample data for your projects.
        - JDOG can be run also as CLI tool.
        - For generating sample data, the data scheme is provided
        - The scheme is in JSON format
        
        Scheme
        ======
        
        - Scheme is provided in JSON format with special placeholders.
        - In the output placeholders are replaced with some generated data.
        
        Any valid JSON is **valid** scheme.
        
        How to use it?
        ==============
        Prepare scheme
        
        .. code-block::
        
            {
              "{{range(people,4)}}": {
                "name": "{{name}}",
                "age": "{{age}}",
                "address": {
                  "city": "{{city}}"
                },
                "car": "{{option(mustang,{{empty}})}}"
              }
            }
        
        .. code-block::
        
            from jdog import Jdog
        
            def main():
                jdog = Jdog()
                scheme = ... # your loaded scheme
        
                # parse scheme
                jdog.parse_scheme(scheme)
        
                # generate instance
                result = jdog.generate()
        
                print(result) # result is JSON
        
        And the example result:
        
        .. code-block::
        
            {
                "people": [
                    {
                        "name": "Brandi Young",
                        "age": 39,
                        "address": {
                            "city": "Jamietown"
                        },
                        "car": "mustang"
                    },
                    {
                        "name": "Michelle Best",
                        "age": 70,
                        "address": {
                            "city": "Port Dustin"
                        },
                        "car": ""
                    },
                    {
                        "name": "Donald Hernandez",
                        "age": 79,
                        "address": {
                            "city": "East Julieshire"
                        },
                        "car": "mustang"
                    },
                    {
                        "name": "Kaitlyn Cook",
                        "age": 3,
                        "address": {
                            "city": "Rachelton"
                        },
                        "car": "mustang"
                    }
                ]
            }
        
        
        
        CLI
        ****
        Package can be used as cli tool.
        
        .. code-block::
        
            Usage: jdog [OPTIONS] SCHEME
        
            Accepts SCHEME and generates new data to stdin or to specified OUTPUT
        
            Options:
              -p, --pretty           Output as pretty JSON.
              -s, --strict           Raise error when no matching placeholder is found.
              -l, --lang TEXT        Language to use.
              --lang-help            Displays available language codes and exit.
              -o, --output FILENAME  Output file where result is written.
              --help                 Show this message and exit.
        
        
        By default, CLI tool does not save output to file, just print results to standard output.
        
        .. end-inclusion-marker-do-not-remove
        
        👍 JDOG is using awesome package `Faker <https://faker.readthedocs.io>`_ which is used to generate random data.
        
        `CONTRIBUTING <https://github.com/petrnymsa/jdog/blob/master/CONTRIBUTING.md>`_
        ===============================================================================
        
        `LICENSE <https://github.com/petrnymsa/jdog/blob/master/LICENSE>`_
        ===============================================================================
        
Keywords: data generator,data generation,json scheme,scheme based,cli tool
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Libraries
