chisel 1.3.5__tar.gz → 1.3.7__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: chisel
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
5
5
  Home-page: https://github.com/craigahobbs/chisel
6
6
  Author: Craig A. Hobbs
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
19
20
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
20
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = chisel
3
- version = 1.3.5
3
+ version = 1.3.7
4
4
  url = https://github.com/craigahobbs/chisel
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -18,6 +18,7 @@ classifiers =
18
18
  Programming Language :: Python :: 3.10
19
19
  Programming Language :: Python :: 3.11
20
20
  Programming Language :: Python :: 3.12
21
+ Programming Language :: Python :: 3.13
21
22
  Topic :: Internet :: WWW/HTTP :: WSGI
22
23
  Topic :: Internet :: WWW/HTTP :: WSGI :: Application
23
24
  Topic :: Software Development :: Libraries :: Application Frameworks
@@ -14,7 +14,7 @@ from .action import Action, ActionError
14
14
  from .request import RedirectRequest, StaticRequest
15
15
 
16
16
 
17
- def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
17
+ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True, markdown_up=None):
18
18
  """
19
19
  Yield a series of requests for use with :meth:`~chisel.Application.add_requests` comprising the Chisel
20
20
  documentation application. By default, the documenation application is hosted at "/doc/".
@@ -25,6 +25,7 @@ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
25
25
  :param bool api: If True, include the documentation APIs. Two documentation APIs are added,
26
26
  "/doc/doc_index" and "`/doc/doc_request <doc/#name=chisel_doc_request>`__".
27
27
  :param bool app: If True, include the documentation client application.
28
+ :param str markdown_up: Optional, the relative path to the MarkdownUp application.
28
29
  :returns: Generator of :class:`~chisel.Request`
29
30
  """
30
31
 
@@ -34,9 +35,15 @@ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
34
35
  if app:
35
36
  yield RedirectRequest((('GET', root_path),), root_path + '/', name='chisel_doc_redirect', doc_group='Documentation')
36
37
  with importlib.resources.files('chisel.static').joinpath('index.html').open('rb') as fh:
38
+ index_bytes = fh.read()
39
+ if markdown_up:
40
+ index_str = index_bytes.decode(encoding='utf-8')
41
+ index_str = index_str.replace('https://craigahobbs.github.io/markdown-up/', markdown_up)
42
+ index_str = index_str.replace("'markdownText':", f"'systemPrefix': '{markdown_up}include/', 'markdownText':")
43
+ index_bytes = index_str.encode(encoding='utf-8')
37
44
  yield StaticRequest(
38
45
  'chisel_doc',
39
- fh.read(),
46
+ index_bytes,
40
47
  'text/html; charset=utf-8',
41
48
  (('GET', root_path + '/'), ('GET', root_path + '/index.html')),
42
49
  'The Chisel documentation HTML',
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: chisel
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
5
5
  Home-page: https://github.com/craigahobbs/chisel
6
6
  Author: Craig A. Hobbs
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
19
20
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
20
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes