Skip to main content

docs

Documentation Status

tests

Travis-CI Build Status
Coverage Status

package

PyPI Package latest release PyPI Wheel Supported versions Supported implementations
Commits since latest release

https://syntactic.readthedocs.io/

Customizable syntax for Python.

Possible uses

  • Experimenting with possible language features.

  • Boilerplate reduction.

Examples

Unicode lambdas

from __syntax__ import unicode_lambda

func = λx: x + 1

is equivalent to

func = lambda x: x + 1

SQL template literals

Embedded sql:

from __syntax__ import sql_literals

engine.query(sql`SELECT author FROM books WHERE name = {book} AND author = {author}`)

is equivalent to:

engine.query('SELECT author FROM books WHERE name = ? AND author = ?', [book, author])

Limitations

The example transformers are written in a fragile way. They are intended only as inspiration rather than production-ready transformers. If you want to add some production-ready ones, pull-requests are welcome.

Metadata

Release files for syntactic 0.1.3

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

Source distribution (sdist)

Source distribution for syntactic 0.1.3
File Size Uploaded
syntactic-0.1.3.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for syntactic 0.1.3
File Interpreter ABI Platform
syntactic-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / syntactic-0.1.3.tar.gz

Download URL syntactic-0.1.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
54258eff69206709193df3615fa33a6e2cc0872a0add4fc6b2232e81b9c37c48
BLAKE2b-256 checksum
How to use checksums
1bbc4f5065843194435a9325daa660d91699095e3ecdeeadbca0e84513c0da08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0b4 CPython/3.7.3 Linux/4.15.0-72-generic

Release files / syntactic-0.1.3-py3-none-any.whl

Download URL syntactic-0.1.3-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
628ced0dc03f6c0580026a0280b42366e9b8fd780923ba51a1aee95bc7702328
BLAKE2b-256 checksum
How to use checksums
e5b3cbda5f512cdde76949aa2528d7559f69703a7257ec67887b3887a4c0f9b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0b4 CPython/3.7.3 Linux/4.15.0-72-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

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