mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
switch readme to restructuredtext for pypi, use as setup.py long_description
This commit is contained in:
parent
e164ea252e
commit
bf9bf7de5a
29
README.md
29
README.md
@ -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))
|
|
||||||
```
|
|
||||||
|
|
40
README.rst
Normal file
40
README.rst
Normal file
@ -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))
|
2
setup.py
2
setup.py
@ -13,4 +13,6 @@ setuptools.setup(
|
|||||||
url='https://github.com/nlevitt/rethinkstuff',
|
url='https://github.com/nlevitt/rethinkstuff',
|
||||||
author='Noah Levitt',
|
author='Noah Levitt',
|
||||||
author_email='nlevitt@archive.org',
|
author_email='nlevitt@archive.org',
|
||||||
|
description='Rudimentary rethinkdb python library with some smarts, perhaps some dumbs',
|
||||||
|
long_description=open('README.rst').read(),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user