# HG changeset patch # User drewp@bigasterisk.com # Date 1684897031 25200 # Node ID 6443cb265a2fcfe53544a796b41f67500a289512 # Parent 418050704a42241f9d719368391c8964b645f45a more useful demo diff -r 418050704a42 -r 6443cb265a2f demo.py --- a/demo.py Tue May 23 19:43:57 2023 -0700 +++ b/demo.py Tue May 23 19:57:11 2023 -0700 @@ -5,21 +5,28 @@ import rdfdb.service -logging.basicConfig(level=logging.INFO) +logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() -root = Path('/tmp/rdfdb_demo') -root.mkdir(exist_ok=True) -(root / "demo.n3").write_text(""" -@prefix : . +def makeSampleDir(): + + root = Path('/tmp/rdfdb_demo') + root.mkdir(exist_ok=True) + (root / "demo.n3").write_text(""" + @prefix : . -:hello :world :triple . -""") -(root / "demo2.n3").write_text(""" -@prefix : . + :hello :world :triple . + """) + (root / "demo2.n3").write_text(""" + @prefix : . -:hello2 :world :triple . -""") + :hello2 :world :triple . + """) + return root + +#root = makeSampleDir() +root = Path('/home/drewp/projects/light9/show/dance2023') + app = rdfdb.service.makeApp( dirUriMap={ root: URIRef('http://example.com/root/'), # diff -r 418050704a42 -r 6443cb265a2f pdm.lock --- a/pdm.lock Tue May 23 19:43:57 2023 -0700 +++ b/pdm.lock Tue May 23 19:57:11 2023 -0700 @@ -80,6 +80,15 @@ summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." [[package]] +name = "click" +version = "8.1.3" +requires_python = ">=3.7" +summary = "Composable command line interface toolkit" +dependencies = [ + "colorama; platform_system == \"Windows\"", +] + +[[package]] name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" @@ -118,6 +127,12 @@ summary = "A list-like structure which implements collections.abc.MutableSequence" [[package]] +name = "h11" +version = "0.14.0" +requires_python = ">=3.7" +summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" + +[[package]] name = "hyperlink" version = "21.0.0" requires_python = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" @@ -310,6 +325,16 @@ summary = "Compatibility API between asyncio/Twisted/Trollius" [[package]] +name = "uvicorn" +version = "0.22.0" +requires_python = ">=3.7" +summary = "The lightning-fast ASGI server." +dependencies = [ + "click>=7.0", + "h11>=0.8", +] + +[[package]] name = "watchdog" version = "3.0.0" requires_python = ">=3.7" @@ -335,7 +360,7 @@ [metadata] lock_version = "4.1" -content_hash = "sha256:991124f9c237628c3968de5991f054f986c3c7a6e3ea8d165812ddb3fd39f682" +content_hash = "sha256:a1ffcc0846d8b7d195769859b5b6583f503dd78eaa60b7a43b10c9d086b51a21" [metadata.files] "aiohttp 3.8.4" = [ @@ -593,6 +618,10 @@ {url = "https://files.pythonhosted.org/packages/fa/8e/2e5c742c3082bce3eea2ddd5b331d08050cda458bc362d71c48e07a44719/charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, {url = "https://files.pythonhosted.org/packages/ff/d7/8d757f8bd45be079d76309248845a04f09619a7b17d6dfc8c9ff6433cac2/charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, ] +"click 8.1.3" = [ + {url = "https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, + {url = "https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, +] "colorama 0.4.6" = [ {url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -702,6 +731,10 @@ {url = "https://files.pythonhosted.org/packages/fa/a1/d0822eb2f827f209c8fcf19ff1c9eb30ae08e25b710cf432b1013ea23429/frozenlist-1.3.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9309869032abb23d196cb4e4db574232abe8b8be1339026f489eeb34a4acfd91"}, {url = "https://files.pythonhosted.org/packages/fd/b8/9ed4ed37b2c3269660a86a10a09b2fe49dbbd6973ac684804ece7b51b63f/frozenlist-1.3.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:924620eef691990dfb56dc4709f280f40baee568c794b5c1885800c3ecc69816"}, ] +"h11 0.14.0" = [ + {url = "https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {url = "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] "hyperlink 21.0.0" = [ {url = "https://files.pythonhosted.org/packages/3a/51/1947bd81d75af87e3bb9e34593a4cf118115a8feb451ce7a69044ef1412e/hyperlink-21.0.0.tar.gz", hash = "sha256:427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b"}, {url = "https://files.pythonhosted.org/packages/6e/aa/8caf6a0a3e62863cbb9dab27135660acba46903b703e224f14f447e57934/hyperlink-21.0.0-py2.py3-none-any.whl", hash = "sha256:e6b14c37ecb73e89c77d78cdb4c2cc8f3fb59a885c5b3f819ff4ed80f25af1b4"}, @@ -882,6 +915,10 @@ {url = "https://files.pythonhosted.org/packages/51/91/bc9fd5aa84703f874dea27313b11fde505d343f3ef3ad702bddbe20bfd6e/txaio-23.1.1.tar.gz", hash = "sha256:f9a9216e976e5e3246dfd112ad7ad55ca915606b60b84a757ac769bd404ff704"}, {url = "https://files.pythonhosted.org/packages/7d/6c/a53cc9a97c2da76d9cd83c03f377468599a28f2d4ad9fc71c3b99640e71e/txaio-23.1.1-py2.py3-none-any.whl", hash = "sha256:aaea42f8aad50e0ecfb976130ada140797e9dcb85fad2cf72b0f37f8cefcb490"}, ] +"uvicorn 0.22.0" = [ + {url = "https://files.pythonhosted.org/packages/ad/bd/d47ee02312640fcf26c7e1c807402d5c5eab468571153a94ec8f7ada0e46/uvicorn-0.22.0-py3-none-any.whl", hash = "sha256:e9434d3bbf05f310e762147f769c9f21235ee118ba2d2bf1155a7196448bd996"}, + {url = "https://files.pythonhosted.org/packages/c6/dd/0d3bab50ab4ef8bec849f89fec2adc2fabcc397018c30e57d9f0d4009c5e/uvicorn-0.22.0.tar.gz", hash = "sha256:79277ae03db57ce7d9aa0567830bbb51d7a612f54d6e1e3e92da3ef24c2c8ed8"}, +] "watchdog 3.0.0" = [ {url = "https://files.pythonhosted.org/packages/00/9e/a9711f35f1ad6571e92dc2e955e7de9dfac21a1b33e9cd212f066a60a387/watchdog-3.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2b57a1e730af3156d13b7fdddfc23dea6487fceca29fc75c5a868beed29177ae"}, {url = "https://files.pythonhosted.org/packages/06/fd/58b82550ebe4883bb2a5e1b6c14d8702b5ce0f36c58470bba51dc777df46/watchdog-3.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:336adfc6f5cc4e037d52db31194f7581ff744b67382eb6021c868322e32eef41"}, diff -r 418050704a42 -r 6443cb265a2f pyproject.toml --- a/pyproject.toml Tue May 23 19:43:57 2023 -0700 +++ b/pyproject.toml Tue May 23 19:57:11 2023 -0700 @@ -31,6 +31,7 @@ "mock", "pytest-asyncio>=0.21.0", "pydeps>=1.10.18", + "uvicorn>=0.22.0", ] [build-system]