This commit is contained in:
Yusur 2025-10-10 19:52:48 +02:00
parent 646ac2e1bf
commit efb5ab1a5b
43 changed files with 698 additions and 1 deletions

3
.gitignore vendored
View file

@ -26,3 +26,6 @@ dist/
/run.sh
ROADMAP.md
aliases/*/src
docs/_build
docs/_static
docs/templates

10
.readthedocs.yaml Normal file
View file

@ -0,0 +1,10 @@
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.13"
sphinx:
configuration: docs/conf.py

20
docs/Makefile Normal file
View file

@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

41
docs/api.rst Normal file
View file

@ -0,0 +1,41 @@
API
===
.. autosummary::
:toctree: generated
suou.sqlalchemy
suou.asgi
suou.bits
suou.calendar
suou.classtools
suou.codecs
suou.collections
suou.color
suou.configparse
suou.dei
suou.dorks
suou.exceptions
suou.flask_restx
suou.flask_sqlalchemy
suou.flask
suou.functools
suou.http
suou.i18n
suou.iding
suou.itertools
suou.legal
suou.lex
suou.luck
suou.markdown
suou.migrate
suou.peewee
suou.quart
suou.redact
suou.sass
suou.signing
suou.snowflake
suou.strtools
suou.terminal
suou.validators
suou.waiter

30
docs/conf.py Normal file
View file

@ -0,0 +1,30 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import sys
from pathlib import Path
sys.path.insert(0, str(Path("..", "src").resolve()))
project = 'suou'
copyright = '2025 Sakuragasaki46'
author = 'Sakuragasaki46'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["sphinx.ext.autodoc", 'sphinx.ext.autosummary', 'myst_parser']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['_static']

View file

@ -0,0 +1,6 @@
suou.asgi
=========
.. automodule:: suou.asgi

View file

@ -0,0 +1,17 @@
suou.bits
=========
.. automodule:: suou.bits
.. rubric:: Functions
.. autosummary::
count_ones
join_bits
mask_shift
mod_ceil
mod_floor
split_bits

View file

@ -0,0 +1,16 @@
suou.calendar
=============
.. automodule:: suou.calendar
.. rubric:: Functions
.. autosummary::
age_and_days
parse_time
want_datetime
want_isodate
want_timestamp

View file

@ -0,0 +1,16 @@
suou.classtools
===============
.. automodule:: suou.classtools
.. rubric:: Classes
.. autosummary::
Incomplete
MissingType
ValueProperty
ValueSource
Wanted

View file

@ -0,0 +1,36 @@
suou.codecs
===========
.. automodule:: suou.codecs
.. rubric:: Functions
.. autosummary::
b2048decode
b2048encode
b32ldecode
b32lencode
b64decode
b64encode
cb32decode
cb32encode
jsonencode
quote_css_string
rb64decode
rb64encode
ssv_list
twocolon_list
want_bytes
want_str
want_urlsafe
want_urlsafe_bytes
z85encode
.. rubric:: Classes
.. autosummary::
StringCase

View file

@ -0,0 +1,12 @@
suou.collections
================
.. automodule:: suou.collections
.. rubric:: Classes
.. autosummary::
TimedDict

View file

@ -0,0 +1,13 @@
suou.color
==========
.. automodule:: suou.color
.. rubric:: Classes
.. autosummary::
Chalk
WebColor

View file

@ -0,0 +1,18 @@
suou.configparse
================
.. automodule:: suou.configparse
.. rubric:: Classes
.. autosummary::
ArgConfigSource
ConfigOptions
ConfigParserConfigSource
ConfigSource
ConfigValue
DictConfigSource
EnvConfigSource

View file

@ -0,0 +1,24 @@
suou.dei
========
.. automodule:: suou.dei
.. rubric:: Module Attributes
.. autosummary::
BRICKS
.. rubric:: Functions
.. autosummary::
dei_args
.. rubric:: Classes
.. autosummary::
Pronoun

View file

@ -0,0 +1,6 @@
suou.dorks
==========
.. automodule:: suou.dorks

View file

@ -0,0 +1,24 @@
suou.exceptions
===============
.. automodule:: suou.exceptions
.. rubric:: Exceptions
.. autosummary::
BabelTowerError
BadLuckError
BrokenStringsError
Fahrenheit451Error
FuckAroundFindOutError
InconsistencyError
LexError
MissingConfigError
MissingConfigWarning
NotFoundError
PoliticalError
PoliticalWarning
TerminalRequiredError

View file

@ -0,0 +1,16 @@
suou.flask
==========
.. automodule:: suou.flask
.. rubric:: Functions
.. autosummary::
add_context_from_config
add_i18n
get_flask_conf
harden
negotiate

View file

@ -0,0 +1,18 @@
suou.flask\_restx
=================
.. automodule:: suou.flask_restx
.. rubric:: Functions
.. autosummary::
output_json
.. rubric:: Classes
.. autosummary::
Api

View file

@ -0,0 +1,18 @@
suou.flask\_sqlalchemy
======================
.. automodule:: suou.flask_sqlalchemy
.. rubric:: Functions
.. autosummary::
require_auth
.. rubric:: Classes
.. autosummary::
FlaskAuthSrc

View file

@ -0,0 +1,18 @@
suou.functools
==============
.. automodule:: suou.functools
.. rubric:: Functions
.. autosummary::
alru_cache
deprecated_alias
flat_args
future
none_pass
not_implemented
timed_cache

View file

@ -0,0 +1,12 @@
suou.http
=========
.. automodule:: suou.http
.. rubric:: Classes
.. autosummary::
WantsContentType

View file

@ -0,0 +1,16 @@
suou.i18n
=========
.. automodule:: suou.i18n
.. rubric:: Classes
.. autosummary::
I18n
I18nLang
IdentityLang
JsonI18n
TomlI18n

View file

@ -0,0 +1,22 @@
suou.iding
==========
.. automodule:: suou.iding
.. rubric:: Functions
.. autosummary::
make_domain_hash
.. rubric:: Classes
.. autosummary::
Siq
SiqCache
SiqFormatType
SiqGen
SiqType

View file

@ -0,0 +1,23 @@
suou.itertools
==============
.. automodule:: suou.itertools
.. rubric:: Functions
.. autosummary::
addattr
additem
kwargs_prefix
ltuple
makelist
rtuple
.. rubric:: Classes
.. autosummary::
hashed_list

View file

@ -0,0 +1,6 @@
suou.legal
==========
.. automodule:: suou.legal

View file

@ -0,0 +1,6 @@
suou.lex
========
.. currentmodule:: suou
.. autofunction:: lex

View file

@ -0,0 +1,19 @@
suou.luck
=========
.. automodule:: suou.luck
.. rubric:: Functions
.. autosummary::
lucky
rng_overload
.. rubric:: Classes
.. autosummary::
RngCallable

View file

@ -0,0 +1,16 @@
suou.markdown
=============
.. automodule:: suou.markdown
.. rubric:: Classes
.. autosummary::
MentionPattern
PingExtension
SpoilerExtension
StrikethroughExtension
StrikethroughPostprocessor

View file

@ -0,0 +1,14 @@
suou.migrate
============
.. automodule:: suou.migrate
.. rubric:: Classes
.. autosummary::
SiqMigrator
SnowflakeSiqMigrator
UlidSiqMigrator

View file

@ -0,0 +1,14 @@
suou.quart
==========
.. automodule:: suou.quart
.. rubric:: Functions
.. autosummary::
add_i18n
add_rest
negotiate

View file

@ -0,0 +1,12 @@
suou.redact
===========
.. automodule:: suou.redact
.. rubric:: Functions
.. autosummary::
redact_url_password

6
docs/generated/suou.rst Normal file
View file

@ -0,0 +1,6 @@
suou
====
.. automodule:: suou

View file

@ -0,0 +1,12 @@
suou.sass
=========
.. automodule:: suou.sass
.. rubric:: Classes
.. autosummary::
SassAsyncMiddleware

View file

@ -0,0 +1,13 @@
suou.signing
============
.. automodule:: suou.signing
.. rubric:: Classes
.. autosummary::
HasSigner
UserSigner

View file

@ -0,0 +1,13 @@
suou.snowflake
==============
.. automodule:: suou.snowflake
.. rubric:: Classes
.. autosummary::
Snowflake
SnowflakeGen

View file

@ -0,0 +1,20 @@
suou.sqlalchemy
===============
.. automodule:: suou.sqlalchemy
.. rubric:: Functions
.. autosummary::
create_session
require_auth_base
token_signer
.. rubric:: Classes
.. autosummary::
AuthSrc

View file

@ -0,0 +1,12 @@
suou.strtools
=============
.. automodule:: suou.strtools
.. rubric:: Classes
.. autosummary::
PrefixIdentifier

View file

@ -0,0 +1,12 @@
suou.terminal
=============
.. automodule:: suou.terminal
.. rubric:: Functions
.. autosummary::
terminal_required

View file

@ -0,0 +1,15 @@
suou.validators
===============
.. automodule:: suou.validators
.. rubric:: Functions
.. autosummary::
matches
must_be
not_greater_than
not_less_than

View file

@ -0,0 +1,19 @@
suou.waiter
===========
.. automodule:: suou.waiter
.. rubric:: Functions
.. autosummary::
ko
ok
.. rubric:: Classes
.. autosummary::
Waiter

18
docs/index.rst Normal file
View file

@ -0,0 +1,18 @@
.. suou documentation master file, created by
sphinx-quickstart on Fri Oct 10 19:24:23 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
suou documentation
==================
SUOU (acronym for ) is a casual Python library providing utilities to
ease programmer's QoL.
.. toctree::
:maxdepth: 2
api

35
docs/make.bat Normal file
View file

@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

View file

@ -37,7 +37,7 @@ from .redact import redact_url_password
from .http import WantsContentType
from .color import chalk
__version__ = "0.7.0"
__version__ = "0.7.1-dev40"
__all__ = (
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',