| title | Contributing - Python Cheatsheet |
|---|---|
| description | The following is a set of guidelines for contributing to the Python cheatsheet. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document. |
| date | June 09, 2018 |
| updated | August 03, 2025 |
First off, thank you for considering contributing to the Python Cheatsheet! It's people like you that make this project a great resource for the Python community.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
The following is a set of guidelines for contributing. These are mostly guidelines, not rules. Use your best judgment, and please don't hesitate to propose changes to this document.
This project and everyone who participates in it is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to services@github.com.
There are many ways to contribute, from writing code and documentation to submitting bug reports and feature requests.
- Reporting Bugs: If you find a bug, please open an Issue and provide as much information as possible.
- Suggesting Enhancements: Have an idea for a new feature or an improvement to an existing one? Open an Issue to discuss it.
- Writing Content: You can add new cheatsheet pages, blog posts, or improve existing content.
- Pull Requests: If you're ready to contribute code or content, we welcome your Pull Requests.
Ready to start contributing? Here’s how to set up the project on your local machine.
-
Fork the Repository
Start by forking the repository to your own GitHub account.
-
Clone Your Fork
Clone your forked repository to your local machine:
git clone https://github.com/YOUR_USERNAME/python-cheatsheet.git cd python-cheatsheet -
Install pnpm
This project uses pnpm as its package manager. If you don't have it, install it:
On Linux/macOS:
curl -fsSL https://get.pnpm.io/install.sh | sh -On Windows (PowerShell):
iwr https://get.pnpm.io/install.ps1 -useb | iex -
Install Dependencies
Install the project dependencies using pnpm:
pnpm install
-
Create a New Branch
Create a descriptive branch for your changes:
git checkout -b your-branch-name
For example:
git checkout -b feat/add-asyncio-cheatsheetorgit checkout -b fix/typo-in-basics. -
Run the Development Server
Start the local development server to see your changes live:
pnpm dev
The site will be available at
http://localhost:3333.
-
Create a new Markdown file in
docs/cheatsheet/en/directory. -
Important: English documentation must be placed in the
en/subdirectory. Do not create translations for other languages - i18n translations will be handled automatically by scripts during deployment. -
Add the following frontmatter and structure:
--- title: Topic Name - Python Cheatsheet description: Brief description of the topic --- <base-title :title="frontmatter.title" :description="frontmatter.description"> Topic Name </base-title> ## Section 1 Your content here...
-
Add the new page to the navigation in
src/store/navigation.ts.
-
Create a new Markdown file in
docs/modules/en/directory. -
Important: English documentation must be placed in the
en/subdirectory. Do not create translations for other languages - i18n translations will be handled automatically by scripts during deployment. -
Add the following frontmatter and structure:
--- title: Python Module Name - Python Cheatsheet description: Brief description of the module --- <base-title :title="frontmatter.title" :description="frontmatter.description"> Python Module Name </base-title> [Module](https://docs.python.org/3/library/module.html) description... ## Section 1 Your content here... ## Relevant links - <router-link to="/cheatsheet/...">Cheatsheet: ...</router-link> - <router-link to="/modules/...">Module: ...</router-link>
-
Use
```outputcode blocks to display code execution outputs separately for better visual presentation.
-
Create a new Markdown file in
docs/blog/en/directory. -
Important: English documentation must be placed in the
en/subdirectory. Do not create translations for other languages - i18n translations will be handled automatically by scripts during deployment. -
Use this template for your blog post:
--- title: Post Title - Python Cheatsheet description: Post description date: MMM DD, YYYY updated: MMM DD, YYYY tags: python, topic, level socialImage: /blog/image.jpg --- <route lang="yaml"> meta: layout: article # You must duplicate the frontmatter here for SSG title: Post Title - Python Cheatsheet description: Post description date: MMM DD, YYYY updated: MMM DD, YYYY tags: [python, topic, level] socialImage: /blog/image.jpg </route> <blog-title-header :frontmatter="frontmatter" title="Display Title" /> Your blog content here...
Before submitting your changes, make sure your code adheres to the project's style and passes all checks:
pnpm lint
pnpm typecheck-
Commit Your Changes
Add and commit your changes with a clear and descriptive message:
git add . git commit -m "feat: Add cheatsheet for XYZ"
-
Push to Your Fork
Push your branch to your fork on GitHub:
git push origin your-branch-name
-
Open a Pull Request
Go to the original repository and open a new pull request. Provide a clear title and description of your changes.
Thank you for your contribution!