Metadata-Version: 2.1
Name: sightingdb
Version: 0.0.5
Summary: The Python Client Library for SightingDB
Home-page: https://www.github.com/stricaud/sightingdb-client
Author: Sebastien Tricaud
Author-email: sebastien@honeynet.org
Maintainer: Sebastien Tricaud
Maintainer-email: sebastien@honeynet.org
License: MIT
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/x-rst

********************************
SightingDB Python Client Library
********************************

SightingDB is a fast database to perform Sightings. It allows to count how many time someone has seen something, when was the first time, when was the last time etc.

This client library is an abstraction from the REST API.

Examples
--------

To write 3 values:

.. code-block:: python

		import sightingdb
		con = sightingdb.connection(host="localhost", apikey="changeme")
		writer = sightingdb.writer(con)
		writer.add("/key/namespace1", "pypi.org")
		writer.add("/key/namespace1", "pypi.org")
		writer.add("/key/namespace2", "example.com")
		writer.commit()

We are counting, so pypi.org will have a count of 2.

To read 2 values, it is almost like writing but ``writer`` became ``reader`` and we ``fetch`` data to iterate on:

.. code-block:: python

		import sightingdb
		con = sightingdb.connection(host="localhost", apikey="changeme")
		reader = sightingdb.reader(con)
		reader.add("/key/namespace1", "pypi.org")
		reader.add("/key/namespace2", "example.com")
		for i in reader.fetch():
		    print(str(i))

And you will be all set to read all the values.



