-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
201 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
|
||
mkdocs: | ||
configuration: mkdocs.yml | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Generators | ||
|
||
tags: | ||
- useful feature | ||
--- | ||
|
||
# Generators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Getting started | ||
|
||
tags: | ||
- information | ||
--- | ||
|
||
# `ufpy` package | ||
|
||
## Introduction | ||
|
||
Ufpy (Useful Python) - is a package for simplifying Python programs using many useful features. | ||
|
||
Now Ufpy has these features: | ||
|
||
- [`UDict`](useful_classes/udict.md "Useful dict."). | ||
- [`UStack`](useful_classes/ustack.md "Useful stack."). | ||
- Generators of classes methods: | ||
- [`cmp_generator`](generators.md "Compare generator. In latest python version were deleted __cmp__ method. With this generator you can use __cmp__ in your class") | ||
- [`r_generator`](generators.md "Reverse generator. Generating __r...__ methods for math operations") | ||
- [`i_generator`](generators.md "I methods generator. Generating __i...__ method for math operations") | ||
- [many protocols for type hinting.](type_checking/protocols.md) | ||
- [many type alias for type hinting.](type_checking/type_alias.md) | ||
|
||
## Installing | ||
|
||
To install `ufpy`, you need `python 3.12+` and `pip`. | ||
After installing, use this command in your `cmd`/`bash` terminal: | ||
|
||
=== "You have one python version" | ||
```shell | ||
pip install ufpy | ||
# or | ||
python -m pip install ufpy | ||
# or | ||
py -m pip install ufpy | ||
``` | ||
|
||
=== "Several versions" | ||
```shell | ||
python -3.12 -m pip install ufpy | ||
# or | ||
py -3.12 -m pip install ufpy | ||
``` | ||
|
||
## Importing and writing some code | ||
|
||
After installing, you can use `ufpy` package in all your projects with `3.12+` python version. | ||
Just import `ufpy` or import certain classes, functions and variables. | ||
|
||
```python | ||
import ufpy | ||
from ufpy import UDict | ||
``` | ||
|
||
Enjoy! | ||
|
||
## About the site | ||
|
||
Site was made using `mkdocs` with `mkdocs material` theme. You can use search: just click `Search` | ||
text input at the top of the page or use the ++s++ or ++f++ hotkeys. You can switch themes using the | ||
button on the left and access the `ufpy` repository using the button on the right. | ||
|
||
## Contribute | ||
|
||
You can also contribute to `ufpy` package or `ufpy` docs site. Just go to `ufpy` repository using | ||
button in right-top of page. For contributing to site you can use `Edit this page` button | ||
(pencil icon in top of every page). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
myst-parser | ||
furo | ||
mkdocs-autorefs | ||
markdown-include | ||
mkdocs-material |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Protocols | ||
|
||
tags: | ||
- type check | ||
--- | ||
|
||
# Protocols |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Type alias | ||
|
||
tags: | ||
- type check | ||
--- | ||
|
||
# Type alias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: UDict | ||
|
||
tags: | ||
- useful class | ||
--- | ||
|
||
# `UDict` class | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: UStack | ||
|
||
tags: | ||
- useful class | ||
--- | ||
|
||
# `UStack` class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
site_name: Useful python (ufpy) | ||
site_url: https://ufpy.readthedocs.io/en/latest/ | ||
|
||
repo_url: https://github.com/honey-team/ufpy | ||
repo_name: honey-team/ufpy | ||
edit_uri: edit/main/docs/ | ||
|
||
theme: | ||
name: material | ||
features: | ||
- content.action.edit | ||
- content.code.copy | ||
- content.tooltips | ||
- header.autohide | ||
- search.suggest | ||
icon: | ||
repo: fontawesome/brands/github | ||
edit: material/pencil | ||
tag: | ||
typec: material/code-braces | ||
info: octicons/info-16 | ||
useful: simple/python | ||
palette: | ||
# Palette toggle for light mode | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
|
||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to system preference | ||
|
||
extra: | ||
tags: | ||
type check: typec | ||
information: info | ||
useful class: useful | ||
useful feature: useful | ||
|
||
plugins: | ||
- search | ||
- tags | ||
|
||
markdown_extensions: | ||
- abbr | ||
- attr_list | ||
- md_in_html | ||
- pymdownx.highlight: | ||
anchor_linenums: true | ||
line_spans: __span | ||
use_pygments: true | ||
pygments_lang_class: true | ||
- pymdownx.details | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.superfences | ||
- pymdownx.keys | ||
- pymdownx.tabbed: | ||
alternate_style: true | ||
- markdown_include.include: | ||
base_path: . | ||
- admonition | ||
- pymdownx.emoji: | ||
emoji_index: !!python/name:material.extensions.emoji.twemoji | ||
emoji_generator: !!python/name:material.extensions.emoji.to_svg |