Skip to main content

Generate CSS stylesheets for each Pygments supported style.

Project description

Commits Contributors Forks Stargazers PyPI - Downloads Issues MIT License

Generate Pygments CSS

Generate CSS stylesheets for each Pygments supported style.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Generate CSS stylesheets for each Pygments supported style.

(back to top)

Built With

(back to top)

Getting Started


To get a local copy up and running choose one of the below install instructions and follow the steps provided.

Install With PIP

The simplest way to install gen-pygments-css is to use pip:

pip install gen-pygments-css

Install From Source

Alternatively you can install from source by following the steps below:

  1. Clone the repo:
    git clone
    cd gen-pygments-css/
  2. Create and source a Python virtual environment:
    python3 -m venv .venv
    source .venv/bin/activate
  3. Install requirements with pip:
    pip install -r requirements.txt

(back to top)


CSS stylesheets for all Pygments styles are output into a created css/ directory by default, this can be overridden.

from gen_pygments_css.gen_pygments_css import gen_pygments_css
# Called with no arguments.
# Called with a string passed into the styles_list.
# Called with a list of strings passed into the styles_list.
gen_pygments_css(styles_list=["monokai", "stata-dark"])
# Call with a CSS selector defined.

# Call with a multiple arguments defined.
gen_pygments_css(css_selector=".highlight", styles_list=["monokai", "stata-dark"])

# Call with a relative custom css_dir.

# Call with an absolute custome css_dir.
# Call the function and create a list of strings containing the paths of all 
# stylesheets.
my_list = gen_pygments_css()

For more examples, please refer to the Documentation

(back to top)


See the open issues for a full list of proposed features (and known issues).

(back to top)


Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)


Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)


Github Link:
PyPi Link:
PDF Documentation:

(back to top)

Project details

Download files

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

Source Distribution

gen-pygments-css-0.0.3.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

gen_pygments_css-0.0.3-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

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