Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Aug 28, 2015
1 parent 5e30122 commit bd4bae9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ second.
:maxdepth: 2

introduction
tutorial
internals

Indices and tables
Expand Down
1 change: 1 addition & 0 deletions docs/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Here is a full example with all the supported field types of repocket:
.. highlight: python
::

from repocket import attributes
from repocket import ActiveRecord

Expand Down
20 changes: 17 additions & 3 deletions docs/source/installing.rst → docs/source/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _installing:
.. _tutorial:

Tutorial
========
Expand Down Expand Up @@ -34,9 +34,9 @@ this is your own application code:

from repocket.connections import configure

configure.connection_pool(hostname='myredis.cooldomain.com', port=6379, db=0)

# now you're ready to declare and use models
configure.connection_pool(hostname='myredis.cooldomain.com', port=6379, db=0)
# at this point you're ready to use your declared models



Expand All @@ -59,3 +59,17 @@ Here is how you declare a model:
name = attributes.Unicode()
email = attributes.Bytes()
password = attributes.Bytes()


If you were in Django you would then need to run ``syncdb`` to have a
SQL table called ``User`` with the declared fields. But *this ain't
Django, ight?*

At this point you are ready to start saving user data in redis.

By default the attributes of the your model are actively saved in a
``hash`` redis datastructure.

Repocket *currenty* also supports another attribute called
``ByteStream`` that will seamlessly store the value in a string, so
that you can ``APPEND`` more bytes to it with a single call.

0 comments on commit bd4bae9

Please sign in to comment.