diff --git a/CHANGELOG.md b/CHANGELOG.md index f767253..4a52d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,19 @@ ## 0.4.0 -+ Added `ValueProperty`, abstract superclass for `ConfigProperty` -+ \[BREAKING] Changed the behavior of `makelist()`: now it's also a decorator, converting its return type to a list (revertable with `wrap=False`) -+ New module `lex` with functions `symbol_table()` and `lex()` — make tokenization more affordable -+ Add `dorks` module and `flask.harden()` ++ `pydantic` is now a hard dependency ++ `ConfigProperty` has now been generalized: check out `classtools.ValueProperty` ++ **BREAKING**: Changed the behavior of `makelist()`: **different behavior when used with callables**. + * When applied as a decorator on callable, it converts its return type to a list. + * Pass `wrap=False` to treat callables as simple objects, restoring the 0.3 behavior. ++ New module `lex` to make tokenization more affordable — with functions `symbol_table()` and `lex()` ++ Add `dorks` module and `flask.harden()`. `dorks` contains common endpoints which may be target by hackers + Add `sqlalchemy.bool_column()`: make making flags painless + Introduce `rb64encode()` and `rb64decode()` to deal with issues about Base64 and padding + * `b64encode()` and `b64decode()` pad to the right + * `rb64encode()` and `rb64decode()` pad to the left, then strip leading `'A'` in output + Added `addattr()`, `PrefixIdentifier()`, `mod_floor()`, `mod_ceil()` -+ First version to have unit tests! ++ First version to have unit tests! (Coverage is not yet complete) ## 0.3.7 diff --git a/README.md b/README.md index 29ee187..948b4af 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # SIS Unified Object Underarmor -Good morning, my brother! Welcome the SUOU (SIS Unified Object Underarmor), a library for the management of the storage of objects into a database. +Good morning, my brother! Welcome the SUOU (SIS Unified Object Underarmor), an utility library for developing API's, database schemas and stuff in Python. -It provides utilities such as [SIQ](https://yusur.moe/protocols/siq.html), signing and generation of access tokens (on top of [ItsDangerous](https://github.com/pallets/itsdangerous)) and various utilities, including helpers for use in Flask and SQLAlchemy. +It provides utilities such as: +* [SIQ](https://yusur.moe/protocols/siq.html) +* signing and generation of access tokens, on top of [ItsDangerous](https://github.com/pallets/itsdangerous) +* helpers for use in Flask and SQLAlchemy +* ... **It is not an ORM** nor a replacement of it; it works along existing ORMs (currently only SQLAlchemy is supported lol). diff --git a/src/suou/__init__.py b/src/suou/__init__.py index 1a8a077..98834c2 100644 --- a/src/suou/__init__.py +++ b/src/suou/__init__.py @@ -27,13 +27,14 @@ from .itertools import makelist, kwargs_prefix, ltuple, rtuple, additem from .i18n import I18n, JsonI18n, TomlI18n from .snowflake import Snowflake, SnowflakeGen from .lex import symbol_table, lex, ilex +from .strtools import PrefixIdentifier -__version__ = "0.4.0-dev28" +__version__ = "0.4.0" __all__ = ( 'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue', 'DictConfigSource', 'EnvConfigSource', 'I18n', 'Incomplete', 'JsonI18n', - 'MissingConfigError', 'MissingConfigWarning', 'Siq', 'SiqCache', 'SiqGen', + 'MissingConfigError', 'MissingConfigWarning', 'PrefixIdentifier', 'Siq', 'SiqCache', 'SiqGen', 'SiqType', 'Snowflake', 'SnowflakeGen', 'StringCase', 'TomlI18n', 'Wanted', 'additem', 'b2048decode', 'b2048encode', 'b32ldecode', 'b32lencode', 'b64encode', 'b64decode', 'cb32encode', 'cb32decode', 'count_ones', diff --git a/src/suou/dorks.py b/src/suou/dorks.py index cf03ca5..1d56c6e 100644 --- a/src/suou/dorks.py +++ b/src/suou/dorks.py @@ -24,5 +24,19 @@ SENSITIVE_ENDPOINTS = """ /package.json /package-lock.json /composer. +/docker-compose. +/config/ +/config. +/secrets. +/credentials. +/.idea/ +/.vscode/ +/storage/ +/logs/ +/.DS_Store +/backup +/.backup +/db.sql +/database.sql """.split() diff --git a/src/suou/forms.py b/src/suou/forms.py deleted file mode 100644 index 8f5318f..0000000 --- a/src/suou/forms.py +++ /dev/null @@ -1,8 +0,0 @@ -""" -Form validation, done right. - -Why this? Why not, let's say, WTForms or Marshmallow? Well, I have my reasons. - -TODO -""" - diff --git a/tests/test_codecs.py b/tests/test_codecs.py index 0e23296..7716aa8 100644 --- a/tests/test_codecs.py +++ b/tests/test_codecs.py @@ -17,10 +17,6 @@ class TestCodecs(unittest.TestCase): def tearDown(self) -> None: ... - #def runTest(self): - # self.test_b64encode() - # self.test_b64decode() - def test_b64encode(self): self.assertEqual(b64encode(B1), 'TvC0w4UK-baaD4KmmUcHIw') self.assertEqual(b64encode(B2), 'vFhpRixAfHu-4wx6qMtRgg')