pygments

Pygments is a generic syntax highlighter written in Python

https://github.com/pygments/pygments

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    27 of 853 committers (3.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.7%) to scientific vocabulary

Keywords

python syntax-highlighting

Keywords from Contributors

closember templates packaging unit-testing pallets humans cookies forhumans python-requests requests
Last synced: 6 months ago · JSON representation

Repository

Pygments is a generic syntax highlighter written in Python

Basic Info
  • Host: GitHub
  • Owner: pygments
  • License: bsd-2-clause
  • Language: Python
  • Default Branch: master
  • Homepage: http://pygments.org/
  • Size: 26.7 MB
Statistics
  • Stars: 2,029
  • Watchers: 40
  • Forks: 740
  • Open Issues: 555
  • Releases: 35
Topics
python syntax-highlighting
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Authors

README.rst

Welcome to Pygments
===================

This is the source of Pygments.  It is a **generic syntax highlighter** written
in Python that supports over 500 languages and text formats, for use in code
hosting, forums, wikis or other applications that need to prettify source code.

Installing
----------

... works as usual, use ``pip install Pygments`` to get published versions,
or ``pip install -e .`` to install from a checkout in editable mode.

Documentation
-------------

... can be found online at https://pygments.org/ or created with Sphinx by ::

   tox -e doc

By default, the documentation does not include the demo page, as it requires
having Docker installed for building Pyodide. To build the documentation with
the demo page, use ::

   tox -e web-doc

The initial build might take some time, but subsequent ones should be instant
because of Docker caching.

To view the generated documentation, serve it using Python's ``http.server``
module (this step is required for the demo to work) ::

   python3 -m http.server --directory doc/_build/html


Development
-----------

... takes place on `GitHub `_, where the
Git repository, tickets and pull requests can be viewed.

Continuous testing runs on GitHub workflows:

.. image:: https://github.com/pygments/pygments/workflows/Pygments/badge.svg
   :target: https://github.com/pygments/pygments/actions?query=workflow%3APygments

Please read our `Contributing instructions `_.

Security considerations
-----------------------

Pygments provides no guarantees on execution time, which needs to be taken
into consideration when using Pygments to process arbitrary user inputs. For
example, if you have a web service which uses Pygments for highlighting, there
may be inputs which will cause the Pygments process to run "forever" and/or use
significant amounts of memory. This can subsequently be used to perform a
remote denial-of-service attack on the server if the processes are not
terminated quickly.

Unfortunately, it's practically impossible to harden Pygments itself against
those issues: Some regular expressions can result in "catastrophic
backtracking", but other bugs like incorrect matchers can also
cause similar problems, and there is no way to find them in an automated fashion
(short of solving the halting problem.) Pygments has extensive unit tests,
automated randomized testing, and is also tested by `OSS-Fuzz `_,
but we will never be able to eliminate all bugs in this area.

Our recommendations are:

* Ensure that the Pygments process is *terminated* after a reasonably short
  timeout. In general Pygments should take seconds at most for reasonably-sized
  input.
* *Limit* the number of concurrent Pygments processes to avoid oversubscription
  of resources.

The Pygments authors will treat any bug resulting in long processing times with
high priority -- it's one of those things that will be fixed in a patch release.
When reporting a bug where you suspect super-linear execution times, please make
sure to attach an input to reproduce it.

The authors
-----------

Pygments is maintained by **Georg Brandl**, e-mail address *georg*\ *@*\ *python.org*, **Matthäus Chajdas** and **Jean Abou-Samra**.

Many lexers and fixes have been contributed by **Armin Ronacher**, the rest of
the `Pocoo `_ team and **Tim Hatch**.

The code is distributed under the BSD 2-clause license.  Contributors making pull
requests must agree that they are able and willing to put their contributions
under that license.

Owner

  • Name: pygments
  • Login: pygments
  • Kind: organization

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 6,002
  • Total Committers: 853
  • Avg Commits per committer: 7.036
  • Development Distribution Score (DDS): 0.725
Past Year
  • Commits: 137
  • Committers: 36
  • Avg Commits per committer: 3.806
  • Development Distribution Score (DDS): 0.657
Top Committers
Name Email Commits
Georg Brandl g****g@p****g 1,653
Matthäus G. Chajdas d****v@a****t 504
Tim Hatch t****m@t****m 309
Jean Abou Samra j****n@a****r 239
Rob Hoelz r****b@h****o 158
thatch t****h@l****t 150
blackbird b****d@l****t 112
Gaurav Jain g****v@g****g 81
Sebastian Engel d****v@s****u 62
Thomas Aglassinger r****i@u****t 56
Jeffrey B. Arnold j****d@g****m 54
EricFromCanada e****e@g****m 54
Colin Kennedy c****x@g****m 51
Andy Li a****y@o****t 51
Daniele Varrazzo d****o@g****m 42
Nathan Whetsell n****l@g****m 42
Charles McLaughlin m****t@g****m 41
mitsuhiko m****o@l****t 33
David Corbett c****v@h****u 31
Martin Fischer m****n@p****m 31
hhsprings x****s@g****m 31
Nerixyz n****v@o****e 26
Eric Wieser w****c@g****m 25
Robert J. Simmons r****s@g****m 24
Andrew Pinkham c****e@a****m 23
Kurt McKee c****e@k****g 23
Camil Staps i****o@c****l 21
JJ Atria j****a@g****m 20
Jonathan v****n 19
Miikka Salminen m****n@g****m 19
and 823 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 274
  • Total pull requests: 520
  • Average time to close issues: 10 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 197
  • Total pull request authors: 207
  • Average comments per issue: 1.99
  • Average comments per pull request: 1.75
  • Merged pull requests: 301
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 71
  • Pull requests: 163
  • Average time to close issues: 8 days
  • Average time to close pull requests: 26 days
  • Issue authors: 56
  • Pull request authors: 72
  • Average comments per issue: 0.38
  • Average comments per pull request: 0.58
  • Merged pull requests: 34
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Anteru (28)
  • verhovsky (13)
  • jeanas (9)
  • RocketRide9 (4)
  • vkoukis (4)
  • stevepiercy (4)
  • dbitouze (4)
  • wiktorInny (3)
  • jofish920 (3)
  • Spill-Tea (3)
  • nabijaczleweli (2)
  • zyoshoka (2)
  • jvoisin (2)
  • vanschelven (2)
  • buhtz (2)
Pull Request Authors
  • jeanas (42)
  • kdeldycke (12)
  • jofish920 (12)
  • d-torrance (12)
  • AmrDeveloper (9)
  • hugovk (8)
  • diskdance (8)
  • randomstuff (8)
  • rrthomas (8)
  • marcauberer (8)
  • birkenfeld (8)
  • anayrat (7)
  • rvanvelzen (6)
  • Nerixyz (6)
  • jbradberry (6)
Top Labels
Issue Labels
X-imported (27) A-lexing (25) T-bug (17) S-minor (14) S-major (11) T-feature (8) help wanted (7) good first issue (6) A-formatting (4) T-proposal (4) A-docs (1) A-api (1) update needed (1)
Pull Request Labels
A-lexing (148) update needed (17) A-docs (12) A-theming (8) A-formatting (5) changelog-update (5)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 285,381,939 last-month
  • Total docker downloads: 1,392,266,205
  • Total dependent packages: 1,858
    (may contain duplicates)
  • Total dependent repositories: 72,226
    (may contain duplicates)
  • Total versions: 86
  • Total maintainers: 3
pypi.org: pygments

Pygments is a syntax highlighting package written in Python.

  • Versions: 67
  • Dependent Packages: 1,834
  • Dependent Repositories: 70,561
  • Downloads: 285,381,939 Last month
  • Docker Downloads: 1,392,266,205
Rankings
Downloads: 0.0%
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Docker downloads count: 0.3%
Average: 0.9%
Stargazers count: 2.4%
Forks count: 2.8%
Maintainers (3)
Last synced: 6 months ago
proxy.golang.org: github.com/pygments/pygments
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 0.8%
Stargazers count: 1.2%
Average: 4.6%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
anaconda.org: pygments

This is the source of Pygments. It is a generic syntax highlighter written in Python that supports over 500 languages and text formats, for use in code hosting, forums, wikis or other applications that need to prettify source code.

  • Versions: 18
  • Dependent Packages: 24
  • Dependent Repositories: 1,665
Rankings
Dependent packages count: 1.3%
Dependent repos count: 2.2%
Average: 9.9%
Forks count: 15.0%
Stargazers count: 21.2%
Last synced: 6 months ago