diff options
Diffstat (limited to 'pathod')
-rwxr-xr-x | pathod/.sources/make | 8 | ||||
-rw-r--r-- | pathod/MANIFEST.in | 2 | ||||
-rw-r--r-- | pathod/README.rst | 2 | ||||
-rwxr-xr-x | pathod/bin/pathoc | 2 | ||||
-rwxr-xr-x | pathod/bin/pathod | 2 | ||||
-rw-r--r-- | pathod/examples/libpathod_pathoc.py | 2 | ||||
-rw-r--r-- | pathod/examples/test_context.py | 2 | ||||
-rw-r--r-- | pathod/examples/test_setup.py | 2 | ||||
-rw-r--r-- | pathod/examples/test_setupall.py | 2 | ||||
-rw-r--r-- | pathod/pathod/app.py | 6 | ||||
-rw-r--r-- | pathod/pathod/templates/docframe.html | 4 | ||||
-rw-r--r-- | pathod/pathod/templates/docs_libpathod.html | 6 | ||||
-rw-r--r-- | pathod/pathod/templates/docs_test.html | 8 | ||||
-rw-r--r-- | pathod/pathod/templates/examples_context.html | 2 | ||||
-rw-r--r-- | pathod/pathod/templates/examples_setup.html | 2 | ||||
-rw-r--r-- | pathod/pathod/templates/examples_setupall.html | 2 | ||||
-rw-r--r-- | pathod/pathod/templates/libpathod_pathoc.html | 8 | ||||
-rw-r--r-- | pathod/setup.py | 6 |
18 files changed, 30 insertions, 38 deletions
diff --git a/pathod/.sources/make b/pathod/.sources/make index 1c8b1d69..94648859 100755 --- a/pathod/.sources/make +++ b/pathod/.sources/make @@ -1,5 +1,5 @@ #!/bin/sh -pygmentize -f html ../examples/test_context.py > ../libpathod/templates/examples_context.html -pygmentize -f html ../examples/test_setup.py > ../libpathod/templates/examples_setup.html -pygmentize -f html ../examples/test_setupall.py > ../libpathod/templates/examples_setupall.html -pygmentize -f html ../examples/libpathod_pathoc.py > ../libpathod/templates/libpathod_pathoc.html +pygmentize -f html ../examples/test_context.py > ../pathod/templates/examples_context.html +pygmentize -f html ../examples/test_setup.py > ../pathod/templates/examples_setup.html +pygmentize -f html ../examples/test_setupall.py > ../pathod/templates/examples_setupall.html +pygmentize -f html ../examples/pathod_pathoc.py > ../pathod/templates/pathod_pathoc.html diff --git a/pathod/MANIFEST.in b/pathod/MANIFEST.in index fb7b776c..a83fa08f 100644 --- a/pathod/MANIFEST.in +++ b/pathod/MANIFEST.in @@ -1,2 +1,2 @@ -graft libpathod +graft pathod recursive-exclude * *.pyc *.pyo *.swo *.swp *.map
\ No newline at end of file diff --git a/pathod/README.rst b/pathod/README.rst index 5593e053..fbedc5ba 100644 --- a/pathod/README.rst +++ b/pathod/README.rst @@ -8,7 +8,7 @@ clients and servers. The project has three components: - ``pathod``, an pathological HTTP daemon. - ``pathoc``, a perverse HTTP client. -- ``libpathod.test``, an API for easily using pathod and pathoc in unit tests. +- ``pathod.test``, an API for easily using pathod and pathoc in unit tests. Installing ---------- diff --git a/pathod/bin/pathoc b/pathod/bin/pathoc index b3121611..ab62d631 100755 --- a/pathod/bin/pathoc +++ b/pathod/bin/pathoc @@ -1,6 +1,6 @@ #!/usr/bin/env python -from libpathod import pathoc_cmdline as cmdline +from pathod import pathoc_cmdline as cmdline if __name__ == "__main__": cmdline.go_pathoc() diff --git a/pathod/bin/pathod b/pathod/bin/pathod index a79becf1..af0c118b 100755 --- a/pathod/bin/pathod +++ b/pathod/bin/pathod @@ -1,6 +1,6 @@ #!/usr/bin/env python -from libpathod import pathod_cmdline as cmdline +from pathod import pathod_cmdline as cmdline if __name__ == "__main__": cmdline.go_pathod() diff --git a/pathod/examples/libpathod_pathoc.py b/pathod/examples/libpathod_pathoc.py index cf94151b..587c0e4c 100644 --- a/pathod/examples/libpathod_pathoc.py +++ b/pathod/examples/libpathod_pathoc.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -from libpathod import pathoc +from pathod import pathoc p = pathoc.Pathoc(("google.com", 80)) p.connect() diff --git a/pathod/examples/test_context.py b/pathod/examples/test_context.py index 7c0386c1..8db4331f 100644 --- a/pathod/examples/test_context.py +++ b/pathod/examples/test_context.py @@ -1,5 +1,5 @@ import requests -from libpathod import test +from pathod import test def test_simple(): diff --git a/pathod/examples/test_setup.py b/pathod/examples/test_setup.py index 6085c98a..5dbc456d 100644 --- a/pathod/examples/test_setup.py +++ b/pathod/examples/test_setup.py @@ -1,5 +1,5 @@ import requests -from libpathod import test +from pathod import test class Test: diff --git a/pathod/examples/test_setupall.py b/pathod/examples/test_setupall.py index f0ba5844..cb84b7b2 100644 --- a/pathod/examples/test_setupall.py +++ b/pathod/examples/test_setupall.py @@ -1,5 +1,5 @@ import requests -from libpathod import test +from pathod import test class Test: diff --git a/pathod/pathod/app.py b/pathod/pathod/app.py index debebaf2..c6b7eabc 100644 --- a/pathod/pathod/app.py +++ b/pathod/pathod/app.py @@ -86,10 +86,10 @@ def make_app(noapi, debug): "docs_pathoc.html", True, section="docs", subsection="pathoc" ) - @app.route('/docs/libpathod') - def docs_libpathod(): + @app.route('/docs/lib_pathod') + def docs_lib_pathod(): return render( - "docs_libpathod.html", True, section="docs", subsection="libpathod" + "docs_lib_pathod.html", True, section="docs", subsection="pathod" ) @app.route('/docs/test') diff --git a/pathod/pathod/templates/docframe.html b/pathod/pathod/templates/docframe.html index 4cbdeebc..797de20a 100644 --- a/pathod/pathod/templates/docframe.html +++ b/pathod/pathod/templates/docframe.html @@ -14,8 +14,8 @@ <li {{subs( "pathod")}}><a href="/docs/pathod">pathod</a></li> <li {{subs( "pathoc")}}><a href="/docs/pathoc">pathoc</a></li> <li {{subs( "lang")}}><a href="/docs/language">language</a></li> - <li {{subs( "libpathod")}}><a href="/docs/libpathod">libpathod</a></li> - <li {{subs( "test")}}><a href="/docs/test">libpathod.test</a></li> + <li {{subs( "pathod")}}><a href="/docs/pathod">pathod</a></li> + <li {{subs( "test")}}><a href="/docs/test">pathod.test</a></li> </ul> </div> </div> diff --git a/pathod/pathod/templates/docs_libpathod.html b/pathod/pathod/templates/docs_libpathod.html index 6d504fe5..8eb6846a 100644 --- a/pathod/pathod/templates/docs_libpathod.html +++ b/pathod/pathod/templates/docs_libpathod.html @@ -1,7 +1,7 @@ {% extends "docframe.html" %} {% block body %} <div class="page-header"> <h1> - libpathod + pathod <small>Using pathod and pathoc in code.</small> </h1> </div> @@ -9,7 +9,7 @@ <div class="row"> <div class="span6"> <p> - Behind the pathod and pathoc command-line tools lurks <b>libpathod</b>, + Behind the pathod and pathoc command-line tools lurks <b>pathod</b>, a powerful library for manipulating and serving HTTP requests and responses. The canonical documentation for the library is in the code, and can be accessed using pydoc. @@ -17,7 +17,7 @@ </div> <div class="span6"> <h1>pathoc</h1> - {% include "libpathod_pathoc.html" %} + {% include "pathod_pathoc.html" %} </div> </div> {% endblock %} diff --git a/pathod/pathod/templates/docs_test.html b/pathod/pathod/templates/docs_test.html index 0502c984..ecd84bc7 100644 --- a/pathod/pathod/templates/docs_test.html +++ b/pathod/pathod/templates/docs_test.html @@ -1,12 +1,12 @@ {% extends "docframe.html" %} {% block body %} <div class="page-header"> <h1> - libpathod.test - <small>Using libpathod in unit tests.</small> + pathod.test + <small>Using pathod in unit tests.</small> </h1> </div> -<p>The <b>libpathod.test</b> module is a light, flexible testing layer for HTTP clients. +<p>The <b>pathod.test</b> module is a light, flexible testing layer for HTTP clients. It works by firing up a Pathod instance in a separate thread, letting you use Pathod's full abilities to generate responses, and then query Pathod's internal logs to establish what happened. All the mechanics of startup, shutdown, finding @@ -15,7 +15,7 @@ <p>The canonical docs can be accessed using pydoc: </p> -<pre class="terminal">pydoc libpathod.test</pre> +<pre class="terminal">pydoc pathod.test</pre> <p> The remainder of this page demonstrates some common interaction patterns using diff --git a/pathod/pathod/templates/examples_context.html b/pathod/pathod/templates/examples_context.html index afb3bd48..20b02c39 100644 --- a/pathod/pathod/templates/examples_context.html +++ b/pathod/pathod/templates/examples_context.html @@ -1,5 +1,5 @@ <div class="highlight"><pre><span class="kn">import</span> <span class="nn">requests</span> -<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">test</span> +<span class="kn">from</span> <span class="nn">pathod</span> <span class="kn">import</span> <span class="n">test</span> <span class="k">def</span> <span class="nf">test_simple</span><span class="p">():</span> diff --git a/pathod/pathod/templates/examples_setup.html b/pathod/pathod/templates/examples_setup.html index c2da1cd1..b8419171 100644 --- a/pathod/pathod/templates/examples_setup.html +++ b/pathod/pathod/templates/examples_setup.html @@ -1,5 +1,5 @@ <div class="highlight"><pre><span class="kn">import</span> <span class="nn">requests</span> -<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">test</span> +<span class="kn">from</span> <span class="nn">pathod</span> <span class="kn">import</span> <span class="n">test</span> <span class="k">class</span> <span class="nc">Test</span><span class="p">:</span> diff --git a/pathod/pathod/templates/examples_setupall.html b/pathod/pathod/templates/examples_setupall.html index 629d11e0..3308f6cb 100644 --- a/pathod/pathod/templates/examples_setupall.html +++ b/pathod/pathod/templates/examples_setupall.html @@ -1,5 +1,5 @@ <div class="highlight"><pre><span class="kn">import</span> <span class="nn">requests</span> -<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">test</span> +<span class="kn">from</span> <span class="nn">pathod</span> <span class="kn">import</span> <span class="n">test</span> <span class="k">class</span> <span class="nc">Test</span><span class="p">:</span> diff --git a/pathod/pathod/templates/libpathod_pathoc.html b/pathod/pathod/templates/libpathod_pathoc.html deleted file mode 100644 index f5871b16..00000000 --- a/pathod/pathod/templates/libpathod_pathoc.html +++ /dev/null @@ -1,8 +0,0 @@ -<div class="highlight"><pre><span class="c">#!/usr/bin/env python</span> -<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">pathoc</span> - -<span class="n">p</span> <span class="o">=</span> <span class="n">pathoc</span><span class="o">.</span><span class="n">Pathoc</span><span class="p">((</span><span class="s">"google.com"</span><span class="p">,</span> <span class="mi">80</span><span class="p">))</span> -<span class="n">p</span><span class="o">.</span><span class="n">connect</span><span class="p">()</span> -<span class="k">print</span> <span class="n">p</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">"get:/"</span><span class="p">)</span> -<span class="k">print</span> <span class="n">p</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">"get:/foo"</span><span class="p">)</span> -</pre></div> diff --git a/pathod/setup.py b/pathod/setup.py index faec47f2..23e26f42 100644 --- a/pathod/setup.py +++ b/pathod/setup.py @@ -9,7 +9,7 @@ import sys here = os.path.abspath(os.path.dirname(__file__)) sys.path.append(os.path.join(here, "..", "netlib")) -from libpathod import version +from pathod import version with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() @@ -42,8 +42,8 @@ setup( include_package_data=True, entry_points={ 'console_scripts': [ - "pathod = libpathod.pathod_cmdline:go_pathod", - "pathoc = libpathod.pathoc_cmdline:go_pathoc" + "pathod = pathod.pathod_cmdline:go_pathod", + "pathoc = pathod.pathoc_cmdline:go_pathoc" ] }, install_requires=[ |