Skip to main content

Synr

Synr is a library that provides a stable Abstract Syntax Tree for Python.

Features

  • The Synr AST does not change between Python versions.
  • Every AST node contains line and column information.
  • There is a single AST node for assignments (compared to three in Python's ast module).
  • Support for returning multiple errors at once.
  • Support for custom error reporting.

Usage

import synr

def test_program(x: int):
  return x + 2

# Parse a Python function into an AST
ast = synr.to_ast(test_program, synr.PrinterDiagnosticContext())

Documentation

Please see https://synr.readthedocs.io/en/latest/ for documentation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synr-0.6.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synr-0.6.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file synr-0.6.0.tar.gz.

File metadata

  • Download URL: synr-0.6.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1021-azure

File hashes

Hashes for synr-0.6.0.tar.gz
Algorithm Hash digest
SHA256 0b4e16b10c3988e1981e3372153a31956f74d86752eaaa55e8c4e7b7fe591e4e
MD5 edb7a0da96dad86615566a4cc5575341
BLAKE2b-256 e75ed50c251e489a931db6d7ddeb39961e0e44561949e70dfdece0b063763f3d

See more details on using hashes here.

File details

Details for the file synr-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: synr-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1021-azure

File hashes

Hashes for synr-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9399b27d9f21c5d439eae92e0159d6f521cc396d27149ac45473012a205a3c30
MD5 cf2ada9ed425c632969118eb4a924bbe
BLAKE2b-256 465e0e5e6780784907acf88ce92095831f9b6e99bbfffb0a2356ddf13967df5f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4

2 files

0.3.1

2 files

0.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page