Metadata-Version: 2.4
Name: qivo-parsers
Version: 0.1.8
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Java
Classifier: Programming Language :: SQL
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Quality Assurance
Summary: QiVo Parsers: code parsers for Java, TypeScript, Spark, SQL dialects, SAS, config and ops files, with evidence for every fact, and a command line
Keywords: parser,java,typescript,pyspark,tsql,snowflake,hive,sas,openapi,kubernetes,airflow,lineage,code graph
Author-email: QiVo Studio <admin@qivo.studio>
License: Proprietary: free to use under the QiVo Studio Licence Agreement 1.0
	(LICENSE.md in the package)
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://qivo.studio
Project-URL: Issues, https://github.com/qivo-studio/qivo-studio/issues

# QiVo Parsers

Code parsers for Java, TypeScript, Spark, SQL dialects, SAS, configuration and operations files, grouped in seven
families. Free to use; part of [QiVo Studio](https://qivo.studio). The parsers are compiled Rust: nothing else to
install, no build of your code needed.

```bash
pip install qivo-parsers
```

## The families

| Family | Reads |
|---|---|
| `java` | Java source (types, methods, calls resolved by declared types, JAX-RS and Spring endpoints, JPA tables, SQL in strings, Feign and HTTP clients, Kafka, JMS, EJB), Maven POMs, MyBatis and iBATIS mappers, Hibernate, JPA and EJB XML; a SCIP index for compiler-checked calls |
| `typescript` | TypeScript and JavaScript: classes, functions, calls, HTTP client calls |
| `spark` | PySpark and other Python, Scala Spark: table reads and writes, `spark.sql`, Kafka |
| `sql` | T-SQL, Snowflake and HiveQL scripts, Liquibase changelogs (Oracle is read by [QiVo ParseOra](https://pypi.org/project/qivo-parseora/)) |
| `sas` | SAS programs: macros expanded, DATA steps and PROC SQL, column-level lineage |
| `config` | Spring Boot application files, Kubernetes manifests, Helm values, OpenAPI 3 and Swagger 2 specs |
| `ops` | Shell scripts, Airflow DAGs, Oozie and Control-M jobs, Logback/Log4j2, Logstash and Splunk config |

Each file goes to one parser, chosen by its name and, where names are not enough, its content (T-SQL from
Snowflake, Airflow from PySpark, a MyBatis mapper from other XML). Files of one run are parsed together, so
references across files resolve: Java calls, mappers to their Java methods, SAS `%include` and macros, a shell
script to the job it launches.

## Command line

```bash
qivo-parsers families                     # the seven families and what each reads
qivo-parsers classify src/                # which family and parser reads each file
qivo-parsers parse src/                   # summary per family: files, nodes, edges, unresolved
qivo-parsers parse src/ --family java,config --out facts.json
qivo-parsers parse src/ --json            # every fact as JSON
qivo-parsers parse src/ --scip index.scip # Java calls checked by the compiler (scip-java)
```

## Python

```python
import qivo_parsers

out = qivo_parsers.parse_dir("src/", families=["java"], repo="loans")
for f in out["files"]:
    for e in f["facts"]["edges"]:
        print(f["path"], e["kind"], e["src"], "->", e["dst"], e["provenance"]["tier"])

qivo_parsers.parse({"etl/load.sas": open("etl/load.sas").read()})
qivo_parsers.family_of("db/load.sql", text)    # ('sql', 'tsql'), or None
```

## What a fact looks like

Every edge carries its evidence (file, line, rule), how it was derived (parser or syntax, `proven` or `heuristic`)
and a confidence. What a parser cannot prove is an unresolved reference with a reason (`HTTP_CLIENT_OTHER_BASE`,
`MACRO_VAR_FROM_DATA`...), never a guessed edge. Ids are stable, so facts from several runs and parsers join:
`table:db/<database>:<SCHEMA>.<NAME>`, `endpoint:svc/<service>:GET /loans/{}`, `topic:kafka:<name>`.

A file no parser reads is listed in `skipped` with the reason.

Name resolution of Oracle SQL and PL/SQL, column lineage across a whole estate, code rules and the QiVo MetaGraph
for AI tools are in QiVo Studio: `pip install qivo-studio`.

Licence: the QiVo Studio Licence Agreement 1.0 (`LICENSE.md` in the package): free to use, no reverse engineering.
Open-source components: `THIRD_PARTY_NOTICES.md`.

Questions, bugs or ideas: admin@qivo.studio, or [open an issue](https://github.com/qivo-studio/qivo-studio/issues).

---

Oracle, Java and MySQL are registered trademarks of Oracle and/or its affiliates. SAS is a registered trademark of SAS Institute Inc. Snowflake is a trademark of Snowflake Inc. Apache Spark, Apache Hive, Apache Airflow, Apache Oozie and Apache Maven are trademarks of the Apache Software Foundation. Kubernetes is a registered trademark of the Linux Foundation. SQL Server is a trademark of Microsoft Corporation. Control-M is a trademark of BMC Software, Inc. Splunk is a trademark of Splunk Inc. Other names may be trademarks of their owners. QiVo Studio is not affiliated with or endorsed by any company named here.

