From bf9bf7de5ac3c538b1ee943ac04dc57baa335955 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 30 Oct 2015 22:28:51 +0000 Subject: [PATCH] switch readme to restructuredtext for pypi, use as setup.py long_description --- README.md | 29 ----------------------------- README.rst | 40 ++++++++++++++++++++++++++++++++++++++++ setup.py | 2 ++ 3 files changed, 42 insertions(+), 29 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index ef42066..0000000 --- a/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# rethinkstuff -Rudimentary rethinkdb python library with some smarts (and maybe some dumbs) - -## What? Why? - -As of now there is a very small amount of code here. I had three projects using the Rethinker class, and had enough code churn inside the class that it became too painful to keep the three copies in sync. Thus, a library shared among them. - -Three main purposes: -- round-robin connections among database servers -- make sure connections close at proper time -- retry retry-able queries on failure - -Not really a connection pool, because it doesn't keep any connections open, but it does take care of connection management. - -### Service Registry - -Now also has a ServiceRegistry class, a lightweight solution for service -discovery for distributed services. Maintains service info and status in a -rethinkdb table called "services". - -## Usage -``` -import rethinkstuff -r = rethinkstuff.Rethinker(['db0.foo.com', 'db0.foo.com:38015', 'db1.foo.com'], 'my_db') -r.table('my_table').insert({'foo':'bar','baz':2}).run() -for result in r.table('my_table'): - print("result={}".format(result)) -``` - diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..d98537d --- /dev/null +++ b/README.rst @@ -0,0 +1,40 @@ +rethinkstuff +============ + +Rudimentary rethinkdb python library with some smarts (and maybe some +dumbs) + +What? Why? +---------- + +As of now there is a very small amount of code here. I had three +projects using the Rethinker class, and had enough code churn inside the +class that it became too painful to keep the three copies in sync. Thus, +a library shared among them. + +Three main purposes: + +- round-robin connections among database servers +- make sure connections close at proper time +- retry retry-able queries on failure + +Not really a connection pool, because it doesn’t keep any connections +open, but it does take care of connection management. + +Service Registry +~~~~~~~~~~~~~~~ + +Now also has a ServiceRegistry class, a lightweight solution for service +discovery for distributed services. Maintains service info and status in +a rethinkdb table called “services”. + +Usage +----- + +:: + + import rethinkstuff + r = rethinkstuff.Rethinker(['db0.foo.com', 'db0.foo.com:38015', 'db1.foo.com'], 'my_db') + r.table('my_table').insert({'foo':'bar','baz':2}).run() + for result in r.table('my_table'): + print("result={}".format(result)) diff --git a/setup.py b/setup.py index 64ee708..1f09e29 100644 --- a/setup.py +++ b/setup.py @@ -13,4 +13,6 @@ setuptools.setup( url='https://github.com/nlevitt/rethinkstuff', author='Noah Levitt', author_email='nlevitt@archive.org', + description='Rudimentary rethinkdb python library with some smarts, perhaps some dumbs', + long_description=open('README.rst').read(), )