metadata-utils 0.2.0__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. metadata_utils-1.0.0/CHANGES.txt +36 -0
  2. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/MANIFEST.in +0 -1
  3. metadata_utils-1.0.0/PKG-INFO +69 -0
  4. metadata_utils-1.0.0/README.md +40 -0
  5. metadata_utils-1.0.0/pyproject.toml +10 -0
  6. metadata_utils-1.0.0/setup.cfg +74 -0
  7. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils/__init__.py +10 -4
  8. metadata_utils-1.0.0/src/metadata_utils.egg-info/PKG-INFO +69 -0
  9. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/SOURCES.txt +1 -2
  10. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/requires.txt +1 -0
  11. metadata_utils-1.0.0/tests/__init__.py +0 -0
  12. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/tests/test_core.py +19 -7
  13. metadata_utils-0.2.0/CHANGES.txt +0 -27
  14. metadata_utils-0.2.0/PKG-INFO +0 -37
  15. metadata_utils-0.2.0/README.md +0 -13
  16. metadata_utils-0.2.0/pyproject.toml +0 -3
  17. metadata_utils-0.2.0/setup.cfg +0 -7
  18. metadata_utils-0.2.0/setup.py +0 -61
  19. metadata_utils-0.2.0/src/metadata_utils.egg-info/PKG-INFO +0 -37
  20. metadata_utils-0.2.0/tox.ini +0 -12
  21. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/LICENSE +0 -0
  22. /metadata_utils-0.2.0/tests/__init__.py → /metadata_utils-1.0.0/src/metadata_utils/py.typed +0 -0
  23. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/dependency_links.txt +0 -0
  24. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/not-zip-safe +0 -0
  25. {metadata_utils-0.2.0 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/top_level.txt +0 -0
@@ -0,0 +1,36 @@
1
+ 1.0.0
2
+ * Add helper examples and test entity round trips and compatibility normalization.
3
+ * Consolidate packaging and tox configuration and add coverage reporting.
4
+ * Extend the test matrix through Python 3.15 while retaining Python 3.6+.
5
+ * Document the quoted HTML attribute context and tighten type annotations.
6
+ * Use the official Black pre-commit mirror.
7
+
8
+ 0.2.1
9
+ * minor formatting
10
+ 0.2.0
11
+ * typing support
12
+ * drop PY2
13
+ * drop PY3.5
14
+ 0.1.3
15
+ packaging fixes
16
+
17
+ 0.1.2
18
+ * black
19
+ * upgraded black; 20.8b1
20
+ * integrated with pre-commit
21
+ * tox and github actions
22
+
23
+ 0.1.1
24
+ * reverted aggressive 2to3 change
25
+
26
+ 0.1.0
27
+ * python 3 support
28
+ * tests
29
+
30
+ 0.0.2
31
+ * added `force_clean_ascii_NFKD`
32
+ * added `force_clean_ascii_NFKC`
33
+ * flake8
34
+
35
+ 0.0.1
36
+ * initial import
@@ -2,7 +2,6 @@ graft src
2
2
  graft tests
3
3
 
4
4
  include setup.cfg pyproject.toml
5
- include tox.ini
6
5
  include CHANGES.txt
7
6
  include LICENSE
8
7
  include README.md
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: metadata_utils
3
+ Version: 1.0.0
4
+ Summary: Lightweight Metadata Support
5
+ Home-page: https://github.com/jvanasco/metadata_utils
6
+ Author: Jonathan Vanasco
7
+ Author-email: jvanasco@2xlp.com
8
+ License: MIT
9
+ Keywords: web
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
22
+ Requires-Python: >=3.6
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Provides-Extra: testing
26
+ Requires-Dist: pytest; extra == "testing"
27
+ Requires-Dist: mypy; extra == "testing"
28
+ Dynamic: license-file
29
+
30
+ ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
31
+
32
+ metadata_utils
33
+ ==============
34
+
35
+ This package offers lightweight tools for dealing with metadata in HTML.
36
+
37
+ ## Quoted HTML attributes
38
+
39
+ Use `html_attribute_escape` on text before inserting it into a quoted HTML
40
+ attribute.
41
+
42
+ ```python
43
+ from metadata_utils import html_attribute_escape, html_attribute_unescape
44
+
45
+ title = 'Fish & "Chips"'
46
+ escaped = html_attribute_escape(title)
47
+ assert f'<span title="{escaped}"></span>' == (
48
+ '<span title="Fish &amp; &quot;Chips&quot;"></span>'
49
+ )
50
+ assert html_attribute_unescape(escaped) == title
51
+ ```
52
+
53
+ `html_attribute_unescape` decodes one layer of the five named entities emitted
54
+ by the escape function (`&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&apos;`).
55
+ Other named and numeric references pass through unchanged.
56
+
57
+ ## ASCII normalization
58
+
59
+ Both helpers apply Unicode normalization, drop any remaining non-ASCII
60
+ characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
61
+ NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
62
+ `é`, which is dropped during ASCII encoding.
63
+
64
+ ```python
65
+ from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
66
+
67
+ assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
68
+ assert force_clean_ascii_NFKC("fi café") == b"fi caf"
69
+ ```
@@ -0,0 +1,40 @@
1
+ ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
2
+
3
+ metadata_utils
4
+ ==============
5
+
6
+ This package offers lightweight tools for dealing with metadata in HTML.
7
+
8
+ ## Quoted HTML attributes
9
+
10
+ Use `html_attribute_escape` on text before inserting it into a quoted HTML
11
+ attribute.
12
+
13
+ ```python
14
+ from metadata_utils import html_attribute_escape, html_attribute_unescape
15
+
16
+ title = 'Fish & "Chips"'
17
+ escaped = html_attribute_escape(title)
18
+ assert f'<span title="{escaped}"></span>' == (
19
+ '<span title="Fish &amp; &quot;Chips&quot;"></span>'
20
+ )
21
+ assert html_attribute_unescape(escaped) == title
22
+ ```
23
+
24
+ `html_attribute_unescape` decodes one layer of the five named entities emitted
25
+ by the escape function (`&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&apos;`).
26
+ Other named and numeric references pass through unchanged.
27
+
28
+ ## ASCII normalization
29
+
30
+ Both helpers apply Unicode normalization, drop any remaining non-ASCII
31
+ characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
32
+ NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
33
+ `é`, which is dropped during ASCII encoding.
34
+
35
+ ```python
36
+ from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
37
+
38
+ assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
39
+ assert force_clean_ascii_NFKC("fi café") == b"fi caf"
40
+ ```
@@ -0,0 +1,10 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61; python_version >= '3.7'", "setuptools>=59.6,<60; python_version < '3.7'", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.black]
6
+ target-version = ['py36']
7
+
8
+ [tool.mypy]
9
+ disallow_untyped_defs = true
10
+ disallow_any_generics = true
@@ -0,0 +1,74 @@
1
+ [metadata]
2
+ name = metadata_utils
3
+ version = attr: metadata_utils.__VERSION__
4
+ description = Lightweight Metadata Support
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ url = https://github.com/jvanasco/metadata_utils
8
+ author = Jonathan Vanasco
9
+ author_email = jvanasco@2xlp.com
10
+ keywords = web
11
+ license = MIT
12
+ license_file = LICENSE
13
+ classifiers =
14
+ Intended Audience :: Developers
15
+ Programming Language :: Python :: 3
16
+ Programming Language :: Python :: 3.6
17
+ Programming Language :: Python :: 3.7
18
+ Programming Language :: Python :: 3.8
19
+ Programming Language :: Python :: 3.9
20
+ Programming Language :: Python :: 3.10
21
+ Programming Language :: Python :: 3.11
22
+ Programming Language :: Python :: 3.12
23
+ Programming Language :: Python :: 3.13
24
+ Programming Language :: Python :: 3.14
25
+ Programming Language :: Python :: 3.15
26
+
27
+ [options]
28
+ python_requires = >=3.6
29
+ package_dir =
30
+ = src
31
+ packages = find:
32
+ include_package_data = true
33
+ zip_safe = false
34
+
35
+ [options.packages.find]
36
+ where = src
37
+
38
+ [options.package_data]
39
+ metadata_utils = py.typed
40
+
41
+ [options.extras_require]
42
+ testing =
43
+ pytest
44
+ mypy
45
+
46
+ [flake8]
47
+ exclude = .eggs/*, .pytest_cache/*, .tox/*, build/*, dist/*
48
+ application_import_names = metadata_utils
49
+ import_order_style = appnexus
50
+
51
+ [tox:tox]
52
+ envlist = py36, py37, py38, py39, py310, py311, py312, py313, py314, py315, mypy
53
+ isolated_build = true
54
+
55
+ [testenv]
56
+ package = wheel
57
+ deps =
58
+ pytest
59
+ coverage
60
+ setenv =
61
+ COVERAGE_FILE = {envtmpdir}{/}.coverage
62
+ commands =
63
+ python -m coverage run --source=metadata_utils -m pytest {posargs}
64
+ python -m coverage html -d htmlcov/{envname}
65
+
66
+ [testenv:mypy]
67
+ basepython = python3.14
68
+ deps = mypy
69
+ commands = python -m mypy src tests
70
+
71
+ [egg_info]
72
+ tag_build =
73
+ tag_date = 0
74
+
@@ -1,8 +1,10 @@
1
1
  # stdlib
2
2
  import unicodedata
3
- from xml.sax.saxutils import escape, unescape
3
+ from typing import Dict
4
+ from xml.sax.saxutils import escape
5
+ from xml.sax.saxutils import unescape
4
6
 
5
- __VERSION__ = "0.2.0"
7
+ __VERSION__ = "1.0.0"
6
8
 
7
9
 
8
10
  # ==============================================================================
@@ -11,23 +13,27 @@ __VERSION__ = "0.2.0"
11
13
  # https://wiki.python.org/moin/EscapingHtml
12
14
  # escape() and unescape() takes care of "&" , "<" and ">"
13
15
  # we need to handle quotes, so we don't break things
14
- html_attribute_escape_table: dict = {'"': "&quot;", "'": "&apos;"}
15
- html_attribute_unescape_table: dict = {
16
+ html_attribute_escape_table: Dict[str, str] = {'"': "&quot;", "'": "&apos;"}
17
+ html_attribute_unescape_table: Dict[str, str] = {
16
18
  v: k for (k, v) in html_attribute_escape_table.items()
17
19
  }
18
20
 
19
21
 
20
22
  def html_attribute_escape(text: str) -> str:
23
+ """Escape text for insertion into a quoted HTML attribute."""
21
24
  return escape(text, html_attribute_escape_table)
22
25
 
23
26
 
24
27
  def html_attribute_unescape(text: str) -> str:
28
+ """Decode the five named entities emitted by html_attribute_escape."""
25
29
  return unescape(text, html_attribute_unescape_table)
26
30
 
27
31
 
28
32
  def force_clean_ascii_NFKD(text: str) -> bytes:
33
+ """Apply NFKD, then return ASCII bytes, dropping non-ASCII characters."""
29
34
  return unicodedata.normalize("NFKD", text).encode("ascii", "ignore")
30
35
 
31
36
 
32
37
  def force_clean_ascii_NFKC(text: str) -> bytes:
38
+ """Apply NFKC, then return ASCII bytes, dropping non-ASCII characters."""
33
39
  return unicodedata.normalize("NFKC", text).encode("ascii", "ignore")
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: metadata_utils
3
+ Version: 1.0.0
4
+ Summary: Lightweight Metadata Support
5
+ Home-page: https://github.com/jvanasco/metadata_utils
6
+ Author: Jonathan Vanasco
7
+ Author-email: jvanasco@2xlp.com
8
+ License: MIT
9
+ Keywords: web
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
22
+ Requires-Python: >=3.6
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Provides-Extra: testing
26
+ Requires-Dist: pytest; extra == "testing"
27
+ Requires-Dist: mypy; extra == "testing"
28
+ Dynamic: license-file
29
+
30
+ ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
31
+
32
+ metadata_utils
33
+ ==============
34
+
35
+ This package offers lightweight tools for dealing with metadata in HTML.
36
+
37
+ ## Quoted HTML attributes
38
+
39
+ Use `html_attribute_escape` on text before inserting it into a quoted HTML
40
+ attribute.
41
+
42
+ ```python
43
+ from metadata_utils import html_attribute_escape, html_attribute_unescape
44
+
45
+ title = 'Fish & "Chips"'
46
+ escaped = html_attribute_escape(title)
47
+ assert f'<span title="{escaped}"></span>' == (
48
+ '<span title="Fish &amp; &quot;Chips&quot;"></span>'
49
+ )
50
+ assert html_attribute_unescape(escaped) == title
51
+ ```
52
+
53
+ `html_attribute_unescape` decodes one layer of the five named entities emitted
54
+ by the escape function (`&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&apos;`).
55
+ Other named and numeric references pass through unchanged.
56
+
57
+ ## ASCII normalization
58
+
59
+ Both helpers apply Unicode normalization, drop any remaining non-ASCII
60
+ characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
61
+ NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
62
+ `é`, which is dropped during ASCII encoding.
63
+
64
+ ```python
65
+ from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
66
+
67
+ assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
68
+ assert force_clean_ascii_NFKC("fi café") == b"fi caf"
69
+ ```
@@ -4,9 +4,8 @@ MANIFEST.in
4
4
  README.md
5
5
  pyproject.toml
6
6
  setup.cfg
7
- setup.py
8
- tox.ini
9
7
  src/metadata_utils/__init__.py
8
+ src/metadata_utils/py.typed
10
9
  src/metadata_utils.egg-info/PKG-INFO
11
10
  src/metadata_utils.egg-info/SOURCES.txt
12
11
  src/metadata_utils.egg-info/dependency_links.txt
File without changes
@@ -1,6 +1,8 @@
1
+ # stdlib
1
2
  import unittest
2
- import metadata_utils
3
3
 
4
+ # local
5
+ import metadata_utils
4
6
 
5
7
  # ==============================================================================
6
8
 
@@ -10,37 +12,47 @@ class TestEscaping(unittest.TestCase):
10
12
  text_escaped = "foo &quot;&apos; bar"
11
13
  text_escaped_twice = "foo &amp;quot;&amp;apos; bar"
12
14
 
13
- def test_escape(self):
15
+ def test_escape(self) -> None:
14
16
  escaped = metadata_utils.html_attribute_escape(self.text_raw)
15
17
  self.assertEqual(escaped, self.text_escaped)
16
18
 
17
- def test_escape_twice(self):
19
+ def test_escape_twice(self) -> None:
18
20
  # we don't parse we, just escape, so this will change
19
21
  escaped_twice = metadata_utils.html_attribute_escape(self.text_escaped)
20
22
  self.assertEqual(escaped_twice, self.text_escaped_twice)
21
23
 
22
- def test_unescape(self):
24
+ def test_unescape(self) -> None:
23
25
  unescaped = metadata_utils.html_attribute_unescape(self.text_escaped)
24
26
  self.assertEqual(unescaped, self.text_raw)
25
27
 
26
- def test_roundtrip(self):
28
+ def test_roundtrip(self) -> None:
27
29
  escaped = metadata_utils.html_attribute_escape(self.text_raw)
28
30
  self.assertEqual(escaped, self.text_escaped)
29
31
  unescaped = metadata_utils.html_attribute_unescape(escaped)
30
32
  self.assertEqual(unescaped, self.text_raw)
31
33
 
34
+ def test_roundtrip_preserves_literal_entity(self) -> None:
35
+ escaped = metadata_utils.html_attribute_escape("&quot;")
36
+ self.assertEqual(escaped, "&amp;quot;")
37
+ self.assertEqual(metadata_utils.html_attribute_unescape(escaped), "&quot;")
38
+
32
39
 
33
40
  class TestCleanAscii(unittest.TestCase):
34
- def test_NFKD(self):
41
+ def test_NFKD(self) -> None:
35
42
  text_unicode = "El Ni\xf1o"
36
43
  text_clean_a = "El Nino" # downgrades
37
44
  escaped = metadata_utils.force_clean_ascii_NFKD(text_unicode)
38
45
  # py3 is a bytes
39
46
  self.assertEqual(escaped, text_clean_a.encode())
40
47
 
41
- def test_NFKC(self):
48
+ def test_NFKC(self) -> None:
42
49
  text_unicode = "El Ni\xf1o"
43
50
  text_clean_a = "El Nio" # strips
44
51
  escaped = metadata_utils.force_clean_ascii_NFKC(text_unicode)
45
52
  # py3 is a bytes
46
53
  self.assertEqual(escaped, text_clean_a.encode())
54
+
55
+ def test_compatibility_ligature(self) -> None:
56
+ text = "\ufb01 caf\xe9"
57
+ self.assertEqual(metadata_utils.force_clean_ascii_NFKD(text), b"fi cafe")
58
+ self.assertEqual(metadata_utils.force_clean_ascii_NFKC(text), b"fi caf")
@@ -1,27 +0,0 @@
1
- 0.2.0
2
- * typing support
3
- * drop PY2
4
- * drop PY3.5
5
- 0.1.3
6
- packaging fixes
7
-
8
- 0.1.2
9
- * black
10
- * upgraded black; 20.8b1
11
- * integrated with pre-commit
12
- * tox and github actions
13
-
14
- 0.1.1
15
- * reverted aggressive 2to3 change
16
-
17
- 0.1.0
18
- * python 3 support
19
- * tests
20
-
21
- 0.0.2
22
- * added `force_clean_ascii_NFKD`
23
- * added `force_clean_ascii_NFKC`
24
- * flake8
25
-
26
- 0.0.1
27
- * initial import
@@ -1,37 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: metadata_utils
3
- Version: 0.2.0
4
- Summary: Lightweight Metadata Support
5
- Home-page: https://github.com/jvanasco/metadata_utils
6
- Author: Jonathan Vanasco
7
- Author-email: jonathan@findmeon.com
8
- License: MIT
9
- Keywords: web
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Programming Language :: Python
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.6
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: License :: OSI Approved :: MIT License
20
- Requires-Python: >=3.6
21
- Description-Content-Type: text/markdown
22
- Provides-Extra: testing
23
- License-File: LICENSE
24
-
25
- ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
26
-
27
- metadata_utils
28
- ==============
29
-
30
- This package offers lightweight tools for dealing with metadata in HTML.
31
-
32
- The following functions are made available to streamline dealing with html encodings:
33
-
34
- * `html_attribute_escape`
35
- * `html_attribute_unescape`
36
- * `force_clean_ascii_NFKD`
37
- * `force_clean_ascii_NFKC`
@@ -1,13 +0,0 @@
1
- ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
2
-
3
- metadata_utils
4
- ==============
5
-
6
- This package offers lightweight tools for dealing with metadata in HTML.
7
-
8
- The following functions are made available to streamline dealing with html encodings:
9
-
10
- * `html_attribute_escape`
11
- * `html_attribute_unescape`
12
- * `force_clean_ascii_NFKD`
13
- * `force_clean_ascii_NFKC`
@@ -1,3 +0,0 @@
1
- [tool.black]
2
- target-version = ['py38']
3
-
@@ -1,7 +0,0 @@
1
- [easy_install]
2
- zip_ok = false
3
-
4
- [egg_info]
5
- tag_build =
6
- tag_date = 0
7
-
@@ -1,61 +0,0 @@
1
- """metadata_utils installation script.
2
- """
3
- import os
4
- import re
5
- from setuptools import setup
6
- from setuptools import find_packages
7
-
8
- HERE = os.path.abspath(os.path.dirname(__file__))
9
-
10
- long_description = description = "Lightweight Metadata Support"
11
- with open(os.path.join(HERE, "README.md")) as fp:
12
- long_description = fp.read()
13
-
14
- # store version in the init.py
15
- with open(os.path.join(HERE, "src", "metadata_utils", "__init__.py")) as v_file:
16
- VERSION = re.compile(r'.*__VERSION__ = "(.*?)"', re.S).match(v_file.read()).group(1)
17
-
18
- requires = []
19
- tests_require = [
20
- "pytest",
21
- ]
22
- testing_extras = tests_require + []
23
-
24
- setup(
25
- name="metadata_utils",
26
- description="Lightweight Metadata Support",
27
- long_description=long_description,
28
- long_description_content_type="text/markdown",
29
- version=VERSION,
30
- url="https://github.com/jvanasco/metadata_utils",
31
- author="Jonathan Vanasco",
32
- author_email="jonathan@findmeon.com",
33
- zip_safe=False,
34
- python_requires=">=3.6",
35
- keywords="web",
36
- install_requires=requires,
37
- tests_require=tests_require,
38
- extras_require={
39
- "testing": testing_extras,
40
- },
41
- test_suite="tests",
42
- packages=find_packages(
43
- where="src",
44
- ),
45
- package_dir={"": "src"},
46
- package_data={"metadata_utils": ["py.typed"]},
47
- include_package_data=True,
48
- classifiers=[
49
- "Intended Audience :: Developers",
50
- "Programming Language :: Python",
51
- "Programming Language :: Python :: 3",
52
- "Programming Language :: Python :: 3.6",
53
- "Programming Language :: Python :: 3.7",
54
- "Programming Language :: Python :: 3.8",
55
- "Programming Language :: Python :: 3.9",
56
- "Programming Language :: Python :: 3.10",
57
- "Programming Language :: Python :: 3.11",
58
- "License :: OSI Approved :: MIT License",
59
- ],
60
- license="MIT",
61
- )
@@ -1,37 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: metadata-utils
3
- Version: 0.2.0
4
- Summary: Lightweight Metadata Support
5
- Home-page: https://github.com/jvanasco/metadata_utils
6
- Author: Jonathan Vanasco
7
- Author-email: jonathan@findmeon.com
8
- License: MIT
9
- Keywords: web
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Programming Language :: Python
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.6
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: License :: OSI Approved :: MIT License
20
- Requires-Python: >=3.6
21
- Description-Content-Type: text/markdown
22
- Provides-Extra: testing
23
- License-File: LICENSE
24
-
25
- ![Python package](https://github.com/jvanasco/metadata_utils/workflows/Python%20package/badge.svg)
26
-
27
- metadata_utils
28
- ==============
29
-
30
- This package offers lightweight tools for dealing with metadata in HTML.
31
-
32
- The following functions are made available to streamline dealing with html encodings:
33
-
34
- * `html_attribute_escape`
35
- * `html_attribute_unescape`
36
- * `force_clean_ascii_NFKD`
37
- * `force_clean_ascii_NFKC`
@@ -1,12 +0,0 @@
1
- [tox]
2
- envlist =
3
- lint,
4
- mypy,
5
- py36,py37,py38,py39,py310,py311
6
-
7
- [testenv]
8
- commands =
9
- python --version
10
- pytest {posargs:}
11
- extras =
12
- testing
File without changes