Skip to main content

Project generated with PyScaffold PyPI-Server

awk_plus_plus

A language designed for data orchestration.

Features

  • Fuzzy regex engine and Semantic search to retrieve information in an in-process DB.
  • End-user programming.
  • Orthogonal Persistence based on DuckDB
  • Transparent reference with Jsonnet. We plan to execute this feature with Dask.
  • URL interpreter to manage data sources.

Installation from pip

Install the package with:

pip install awk_plus_plus

CLI Usage

You output your data to JSON with the cti command.

Web service

The command runs a web service with Gradio, allowing you to execute your expressions through a user-friendly user interface or by making HTTP requests.

cti run-webservice

Jsonnet support

Hello world

cti i "Hello world" -p -v 4

Jsonnet support

cti i '{"keys":: ["AWK", "SED", "SHELL"], "languages": [std.asciiLower(x) for x in self.keys]}'

URL interpreter

Our step further is the URL interpreter which allows you to manage different data sources with an unique syntax across a set of plugins.

STDIN, STDOUT, STDERR

cti i '{"lines": interpret("stream://stdin?strip=true")}'

Imap

cti i '{"emails": interpret("imap://USER:PASSWORD@HOST:993/INBOX")}'

Keyring

cti i '{"email":: interpret("keyring://backend/awk_plus_plus/email"), "emails": interpret($.email)}'

Files

cti i 'interpret("**/*.csv")'

SQL

cti i 'interpret("sql:SELECT * FROM email")'

Leverage the Power of Reference with Jsonnet

Unlike other programming languages that require multiple steps to reference data, Jsonnet requires only one step, thanks to its reference mechanism. This is particularly useful for data engineers who want to connect different services in a topological order. The code below represents this scenario in Python:

import requests

def fetch_character(id):
    url = f"https://rickandmortyapi.com/api/character/{id}"
    response = requests.get(url)
    return response.json()

def process_character(character):
    # Add new 'image' field with processed URL
    character['image'] += f"?awk_download=data/{character['name'].replace(' ', '_').lower()}.jpeg"
    
    # Process 'episode' field, fetching additional data if necessary
    character['episode'] = [requests.get(episode).json() for episode in character['episode']]
    
    return character


print([process_character(fetch_character(id)) for id in [1, 2, 3, 4, 5, 6]])

Contrary to the previous Python code, Jsonnet allows you to leverage the power of referential transparency. The previous code is equivalent in Jsonnet to:

[
   i("https://rickandmortyapi.com/api/character/%s" % id) + 
    {image: i(super.image+"?awk_download=data/"+std.strReplace(std.asciiLower(super.name), " ", "_")+".jpeg")} + 
    {episode: [i(episode) for episode in super.episode]}
   for id in [1,2,3,4,5,6]
]

Connect and call different data sources in one expression

{
   "emails": i("sql:SELECT subject FROM `%s`" %  self.email),
   // This expression saves the unseen emails from your inbox, as defined in your keyring, using IMAP query criteria. It then returns the netloc hash, which refers to the table.
   "email": i(i("keyring://backend/awk_plus_plus/primary_email")+"?q=UNSEEN")
}

Protocols and Plugins

  • pop3://
  • imap://
  • keyring://backend/{service}/{username}
  • sql:{expression}
  • https://
  • file:/

Note

This project has been set up using PyScaffold 4.5 and the dsproject extension 0.0.post167+g4386552.

Metadata

Release files for awk-plus-plus 0.17.1

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

Source distribution (sdist)

Source distribution for awk-plus-plus 0.17.1
File Size Uploaded Provenance Actions
awk_plus_plus-0.17.1.tar.gz 37.0 kB Without provenance Details for awk_plus_plus-0.17.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for awk-plus-plus 0.17.1
File Interpreter ABI Platform Actions
awk_plus_plus-0.17.1-py3-none-any.whl Python 3 none any Details for awk_plus_plus-0.17.1-py3-none-any.whl

Total release size: 52.0 kB

Release files / awk_plus_plus-0.17.1.tar.gz

Download URL awk_plus_plus-0.17.1.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6efaaf35dd760e60b7650bffee9aa1f9c49d052adcdb289e28f8f06e7ec1ad47
BLAKE2b-256 checksum
How to use checksums
8e29991bcc251a70e0b9577019b072ea8d2aa3e9add956acc56b4f0ad47e6ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / awk_plus_plus-0.17.1-py3-none-any.whl

Download URL awk_plus_plus-0.17.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24d5206553ae31e68a66bb9e42a9c7030ce1586407e9e2058198f543d9d45c7c
BLAKE2b-256 checksum
How to use checksums
f292d6be8879aeb6f228aae6ac2b305b4cfaf7071aa7424e8b65b8c98d65bd63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Security for awk-plus-plus 0.17.1

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.

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