Skip to main content

A small documentation server for PyMiner

Project description

PyMiner Documentation Server

This is a simple documentation server, mainly for PyMiner.

PyMiner文档服务器

这是一个简单的文档服务器,使用传统的后端渲染技术,主要采用了以下框架:

  1. WSGI服务器:waitress
  2. 后端服务器:flask
  3. Markdown:markdown
  4. 样式预处理器:sass

目前非常不完善,只是一个临时的小服务器,欢迎各位一起完善。

接口

目前主要考虑两个接口:

创建服务器:server = Server(base_path)

启动服务器:server.run()

打开特定页面:server.show(path: str)。 这将直接调用webbrowser.open打开一个网页。

这个特定页面的路径应该是基于服务器的根路径base_path的相对路径,例如:

import os

from pyminer_algorithms_document_server.server import Server

if __name__ == '__main__':
    server = Server(os.path.join(os.path.dirname(__file__), 'base'))
    server.run()
    server.show('lib1/func1.md')
    from time import sleep

    sleep(10)

应当注意的是,服务器跑在dameon线程中,当主程序退出时,子线程也会随之退出。

致谢

感谢nwljy提供的初版代码!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file pyminer_algorithms_document_server-0.0.5.tar.gz.

File metadata

  • Download URL: pyminer_algorithms_document_server-0.0.5.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.1

File hashes

Hashes for pyminer_algorithms_document_server-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3f0609a8b764b953c71d8f95d8439c3d84bff74445954cc200d47735ccacf873
MD5 fc1046c04a08c45fa96b23f1c897ee6b
BLAKE2b-256 7d01100b7100fd978d0570530a60d28feb55b55f765fc70d5532b3842b1a3818

See more details on using hashes here.

File details

Details for the file pyminer_algorithms_document_server-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pyminer_algorithms_document_server-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1659ddd5184c8fb57ec90fa66a23e1e8762da230338b33d68942cd1691ab204d
MD5 1bd136cb504365a4f6b40c5b1c369d68
BLAKE2b-256 b54f47b509de5c509db44e0ebe0882937b6e7633e3decf822e86de0432228da0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page