https://github.com/codecaine-zz/python_std_examples
Python Standard Library by Example using AI
https://github.com/codecaine-zz/python_std_examples
documentation library llama3 ollama python3 standard standard-library stl
Last synced: 8 months ago
JSON representation
Python Standard Library by Example using AI
- Host: GitHub
- URL: https://github.com/codecaine-zz/python_std_examples
- Owner: codecaine-zz
- Created: 2024-12-03T20:21:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-31T13:10:39.000Z (over 1 year ago)
- Last Synced: 2025-01-20T15:26:12.388Z (over 1 year ago)
- Topics: documentation, library, llama3, ollama, python3, standard, standard-library, stl
- Language: HTML
- Homepage: https://codefreelance.net/apps/python_std_bible/
- Size: 3.39 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Python standard library code examples using AI
This application generates code examples for Python's standard library modules using AI. The code examples are generated using the qwen2.5-coder:3b model.
## How to Use
1. Install the necessary dependencies:
```bash
pip install -r requirements.txt
```
2. Ensure the `ollama` service is running.
3. Run the main script to generate individual module examples:
```bash
python main.py [--force]
```
Use `--force` to overwrite existing example files.
4. The markdown files for each standard library module will be created under the `standard_library_documents` directory.
5. Optionally, generate a single merged markdown document:
```bash
python create_markdown_version.py
```
The combined file `markdown_version/python_std_bible.md` will be created.
6. Optionally, generate a JSON version:
```bash
python create_json_version.py
```
The file `json_version/python_std_bible.json` will be created.
7. Optionally, add table of contents to all markdown files:
```bash
python add_table_of_contents.py
```
This will automatically add a Table of Contents section to each markdown file in the `standard_library_documents` directory, making navigation easier within each document.
8. Optionally, generate an HTML version:
```bash
python create_html_version.py
```
The file `html_version/index.html` will be created with interactive navigation and copy buttons.
9. You can add or remove modules in `main.py` under the `standard_library` dictionary to customize the examples.
## Application Demo
Check out the demo of this application [here](https://codefreelance.net/apps/python_std_bible/).
### Development Notes
You can use Copilot edits to refactor the `standard_library_documents` to improve examples if needed.