{"id":13440989,"url":"https://github.com/pygments/pygments","last_synced_at":"2025-05-12T05:24:18.821Z","repository":{"id":37334744,"uuid":"205564111","full_name":"pygments/pygments","owner":"pygments","description":"Pygments is a generic syntax highlighter written in Python","archived":false,"fork":false,"pushed_at":"2025-01-11T09:34:09.000Z","size":29095,"stargazers_count":1965,"open_issues_count":516,"forks_count":714,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-05-12T02:41:02.080Z","etag":null,"topics":["python","syntax-highlighting"],"latest_commit_sha":null,"homepage":"http://pygments.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pygments.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-31T15:46:03.000Z","updated_at":"2025-05-11T04:19:44.000Z","dependencies_parsed_at":"2022-07-13T17:20:38.942Z","dependency_job_id":"82d4067c-dc80-42d7-bc49-e38047f7cce9","html_url":"https://github.com/pygments/pygments","commit_stats":{"total_commits":5891,"total_committers":871,"mean_commits":6.763490241102182,"dds":0.7205907316245119,"last_synced_commit":"27649ebbf5a2519725036b48ec99ef7745f100af"},"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygments%2Fpygments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygments%2Fpygments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygments%2Fpygments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygments%2Fpygments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pygments","download_url":"https://codeload.github.com/pygments/pygments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672698,"owners_count":21945480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","syntax-highlighting"],"created_at":"2024-07-31T03:01:28.616Z","updated_at":"2025-05-12T05:24:18.794Z","avatar_url":"https://github.com/pygments.png","language":"Python","readme":"Welcome to Pygments\n===================\n\nThis is the source of Pygments.  It is a **generic syntax highlighter** written\nin Python that supports over 500 languages and text formats, for use in code\nhosting, forums, wikis or other applications that need to prettify source code.\n\nInstalling\n----------\n\n... works as usual, use ``pip install Pygments`` to get published versions,\nor ``pip install -e .`` to install from a checkout in editable mode.\n\nDocumentation\n-------------\n\n... can be found online at https://pygments.org/ or created with Sphinx by ::\n\n   tox -e doc\n\nBy default, the documentation does not include the demo page, as it requires\nhaving Docker installed for building Pyodide. To build the documentation with\nthe demo page, use ::\n\n   tox -e web-doc\n\nThe initial build might take some time, but subsequent ones should be instant\nbecause of Docker caching.\n\nTo view the generated documentation, serve it using Python's ``http.server``\nmodule (this step is required for the demo to work) ::\n\n   python3 -m http.server --directory doc/_build/html\n\n\nDevelopment\n-----------\n\n... takes place on `GitHub \u003chttps://github.com/pygments/pygments\u003e`_, where the\nGit repository, tickets and pull requests can be viewed.\n\nContinuous testing runs on GitHub workflows:\n\n.. image:: https://github.com/pygments/pygments/workflows/Pygments/badge.svg\n   :target: https://github.com/pygments/pygments/actions?query=workflow%3APygments\n\nPlease read our `Contributing instructions \u003chttps://pygments.org/docs/contributing\u003e`_.\n\nSecurity considerations\n-----------------------\n\nPygments provides no guarantees on execution time, which needs to be taken\ninto consideration when using Pygments to process arbitrary user inputs. For\nexample, if you have a web service which uses Pygments for highlighting, there\nmay be inputs which will cause the Pygments process to run \"forever\" and/or use\nsignificant amounts of memory. This can subsequently be used to perform a\nremote denial-of-service attack on the server if the processes are not\nterminated quickly.\n\nUnfortunately, it's practically impossible to harden Pygments itself against\nthose issues: Some regular expressions can result in \"catastrophic\nbacktracking\", but other bugs like incorrect matchers can also\ncause similar problems, and there is no way to find them in an automated fashion\n(short of solving the halting problem.) Pygments has extensive unit tests,\nautomated randomized testing, and is also tested by `OSS-Fuzz \u003chttps://github.com/google/oss-fuzz/tree/master/projects/pygments\u003e`_,\nbut we will never be able to eliminate all bugs in this area.\n\nOur recommendations are:\n\n* Ensure that the Pygments process is *terminated* after a reasonably short\n  timeout. In general Pygments should take seconds at most for reasonably-sized\n  input.\n* *Limit* the number of concurrent Pygments processes to avoid oversubscription\n  of resources.\n\nThe Pygments authors will treat any bug resulting in long processing times with\nhigh priority -- it's one of those things that will be fixed in a patch release.\nWhen reporting a bug where you suspect super-linear execution times, please make\nsure to attach an input to reproduce it.\n\nThe authors\n-----------\n\nPygments is maintained by **Georg Brandl**, e-mail address *georg*\\ *@*\\ *python.org*, **Matthäus Chajdas** and **Jean Abou-Samra**.\n\nMany lexers and fixes have been contributed by **Armin Ronacher**, the rest of\nthe `Pocoo \u003chttps://www.pocoo.org/\u003e`_ team and **Tim Hatch**.\n\nThe code is distributed under the BSD 2-clause license.  Contributors making pull\nrequests must agree that they are able and willing to put their contributions\nunder that license.\n","funding_links":[],"categories":["HarmonyOS","Python","Text Processing","Containers \u0026 Language Extentions \u0026 Linting","语言资源库","Others"],"sub_categories":["Windows Manager","For Python","python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpygments%2Fpygments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpygments%2Fpygments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpygments%2Fpygments/lists"}