Skip to main content

Dialog Flow Script Parser

Dialog Flow Script Parser is python module add-on for Dialog Flow Framework, a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.

Dialog Flow Script Parser allows you to parse python files in order to extract inputs and dictionaries. Codestyle Tests License Apache 2.0 Python 3.6, 3.7, 3.8, 3.9

Quick Start

Installation

pip install df_script_parser

py2yaml

df_script_parser.py2yaml --help
usage: df_script_parser.py2yaml [-h] [--requirements REQUIREMENTS] ROOT_FILE PROJECT_ROOT_DIR OUTPUT_FILE

Compress a dff project into a yaml file by parsing files inside PROJECT_ROOT_DIR starting with ROOT_FILE.
Extract imports, assignments of dictionaries and function calls from each file.
Recursively parse imported local modules.
Collect non-local modules as project requirements

positional arguments:
ROOT_FILE             Python file to start parsing with
PROJECT_ROOT_DIR      Directory that contains all the local files required to run ROOT_FILE
OUTPUT_FILE           Yaml file to store parser output in

optional arguments:
-h, --help            show this help message and exit
--requirements REQUIREMENTS
File with project requirements to override those collected by parser

NOTE: Use py2yaml parser in the same python environment that is used to launch the script otherwise site packages will not be found. NOTE: Any assignments of function calls in which the function being called is df_engine.core.Actor will be checked for correctness of the arguments passed to the function.

File formats

The OUTPUT_FILE will contain:

  1. requirements key which points to a list of project requirements collected by parser. If optional argument REQUIREMENTS was specified replace the list with a list of requirements from that file
  2. namespaces key which points to a dictionary with all the parsed files. Keys are the names of those modules that could be used to import it from PROJECT_ROOT_DIR or its parent directory if PROJECT_ROOT_DIR contains a __init__.py file. The values are dictionaries in which keys are the names of the objects inside the module while values are their definitions.

yaml2py

df_script_parser.yaml2py --help
usage: df_script_parser.yaml2py [-h] YAML_FILE EXTRACT_TO_DIRECTORY

Extract project from a yaml file to a directory

positional arguments:
YAML_FILE             Yaml file to load
EXTRACT_TO_DIRECTORY  Path to the directory to extract project to

optional arguments:
-h, --help            show this help message and exit

Examples

To get more advanced examples, take a look at examples.

Contributing to the Dialog Flow Script Parser

Please refer to CONTRIBUTING.md.

Metadata

Release files for df-script-parser 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for df-script-parser 0.2.0
File Size Uploaded Provenance Actions
df_script_parser-0.2.0.tar.gz 26.5 kB Without provenance Details for df_script_parser-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for df-script-parser 0.2.0
File Interpreter ABI Platform Actions
df_script_parser-0.2.0-py3-none-any.whl Python 3 none any Details for df_script_parser-0.2.0-py3-none-any.whl

Total release size: 55.8 kB

Release files / df_script_parser-0.2.0.tar.gz

Download URL df_script_parser-0.2.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e3342dd0fa42bebaa191d6a37290d7f6df0f319e7a0de5b71e836ac5492d4237
BLAKE2b-256 checksum
How to use checksums
9e822d93d8528ad8333b4b2247d66b4bc451d184e827b9690b8d1708041e6ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / df_script_parser-0.2.0-py3-none-any.whl

Download URL df_script_parser-0.2.0-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38f3311adb91672805ec6e56450489d7afccd1edda28b1ab56aafdbb23286b7a
BLAKE2b-256 checksum
How to use checksums
33451164d929254b3ae0e6421900e03776d2fef8b2f4ed9aa7c535c4b02cc522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for df-script-parser 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page