Skip to main content

A tree-sitter parser for MANIFEST.in files

Project description

CI discord matrix pypi

A tree-sitter parser for PyPA manifest files.

Python package

Installation

pip install tree-sitter-pymanifest

Usage

import tree_sitter_pymanifest as pymanifest

with open('MANIFEST.in', 'r') as mf:
   # parse a MANIFEST.in file
   tree = pymanifest.parse(mf.read())
   # get the highlight groups
   hl_groups = pymanifest.highlights(tree)
   # run an arbitrary query
   dir_patterns = pymanifest.query("""
   (command dir_pattern: (pattern) @dir_pattern)
   """, tree.root_node)

References

Editors

  ☑ Neovim
  ☐ Helix
  ☐ Emacs
  ☐ Zed

Changelog

v0.4.0

  • Change bindings layout

v0.3.0

  • Move to tree-sitter-grammars org

v0.2.1

  • Drop Python 3.7 support

  • Remove injections queries

  • Use tree-sitter core highlight captures

v0.2.0

  • Add Python package tests

v0.1.1

  • Bundle queries in the package

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tree_sitter_pymanifest-0.4.0-cp39-abi3-win_amd64.whl (14.6 kB view hashes)

Uploaded CPython 3.9+ Windows x86-64

tree_sitter_pymanifest-0.4.0-cp39-abi3-musllinux_1_1_x86_64.whl (12.0 kB view hashes)

Uploaded CPython 3.9+ musllinux: musl 1.1+ x86-64

tree_sitter_pymanifest-0.4.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

tree_sitter_pymanifest-0.4.0-cp39-abi3-macosx_10_9_universal2.whl (15.6 kB view hashes)

Uploaded CPython 3.9+ macOS 10.9+ universal2 (ARM64, x86-64)

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page