Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 5f11c7c

Browse files
committed
Fixing long description for next release
1 parent f4277a7 commit 5f11c7c

2 files changed

Lines changed: 4 additions & 104 deletions

File tree

pycket.egg-info/PKG-INFO

Lines changed: 2 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,12 @@
11
Metadata-Version: 1.0
22
Name: pycket
3-
Version: 0.1.1
3+
Version: 0.1.2
44
Summary: Redis sessions for Tornado
55
Home-page: https://github.com/diogobaeder/pycket
66
Author: Diogo Baeder
77
Author-email: desenvolvedor@diogobaeder.com.br
88
License: BSD 2-Clause
9-
Description: # pycket
10-
This is a session library, written for use with Redis and Tornado web server.
11-
12-
## License
13-
This software is under BSD 2-Clause License (see LICENSE file)
14-
15-
## Requirements
16-
Non-Python requirements:
17-
18-
* Redis (tested with version 2.4.0)
19-
20-
Python requirements (included in setup script)
21-
22-
* [Tornado](http://pypi.python.org/pypi/tornado) (tested with 2.1.1, installable via "tornado" package in PyPI)
23-
* [redis-py](http://pypi.python.org/pypi/redis/) (tested with 2.4.9, installable via "redis" package in PyPI)
24-
25-
### Development requirements
26-
If you wish to contribute to the project as a developer, just install the requirements file included in the project with pip.
27-
28-
## Examples
29-
You have two ways of using pycket sessions in your application.
30-
31-
The easier way is including the appropriate mixin(s) in the handler's inheritance list, and the "session" member will become available:
32-
33-
```python
34-
from pycket.session import SessionMixin
35-
36-
37-
class MyHandler(tornado.web.RequestHandler, SessionMixin):
38-
def get(self):
39-
self.session.set('foo', ['bar', 'baz'])
40-
foo = self.session.get('foo') # will get back the list ['bar', 'baz']
41-
```
42-
43-
The other way (harder, but less coupled) is to instantiate a SessionManager and passing the handler instance to the initializer:
44-
45-
```python
46-
from pycket.session import SessionManager
47-
48-
49-
class MyHandler(tornado.web.RequestHandler):
50-
def get(self):
51-
session = SessionManager(self)
52-
session.set('foo', ['bar', 'baz'])
53-
foo = session.get('foo') # will get back the list ['bar', 'baz']
54-
```
55-
56-
For both examples above the session instance is a SessionManager.
57-
58-
SessionManager instances act as a dictionary, so they can retrieve values with a default alternative, like:
59-
60-
```python
61-
session.get("this doesn't exist", "so give me this instead")
62-
```
63-
64-
and they can also get and set values with square-brackets, like:
65-
66-
```python
67-
session['gimme'] = 'Fire!'
68-
print session['gimme'] # 'Fire!'
69-
```
70-
71-
## Settings
72-
pycket understands two types of settings, which must be items in the application's settings:
73-
74-
1. "pycket_redis": this is a dictionary containing any items that should be repassed to the redis.Redis instance to be used in the session manager (such as "host" and "port"); Notice, however, that if you want to change the dataset numbers to be used for sessions and notifications, use "db_sessions" and "db_notifications", respectively, instead of "db" (they will be converted to the "db" parameter that is passed to the Redis client for each manager afterwards);
75-
2. "pycket_cookies": this is a dictionary containing all settings to be repassed to the RequestHandler.set_secure_cookie. If they don't contain "expires" or "expires_days" items, they will be set as None, which means that the default behaviour for the sessions is to last on browser session. (And deleted as soon as the user closes the browser.) Notice that the sessions in the database last for one day, though.
76-
77-
Example:
78-
79-
```python
80-
application = tornado.web.Application([
81-
(r'/', MainHandler),
82-
], **{
83-
'pycket_redis': {
84-
'host': 'localhost',
85-
'port': 6379,
86-
'db_sessions': 10,
87-
'db_notifications': 11,
88-
}
89-
'pycket_cookies': {
90-
'expires_days': 120,
91-
}
92-
)
93-
```
94-
95-
The default dataset numbers for sessions and notifications are, respectively, 0 and 1.
96-
97-
## Notifications
98-
This feature is almost equal to the sessions, but slightly different:
99-
100-
* They have to be used via pycket.notification.NotificationMixin or pycket.notification.NotificationManager;
101-
* The values persisted with them can be retrieved only once, and after this are immediately deleted from the dataset;
102-
* The default dataset used is 1, instead of 0, to avoid conflicts with normal sessions.
103-
104-
## Author
105-
This module was developed by Diogo Baeder (*/diogobaeder), who is an absolute Python lover, and is currently in love with event-driven programming and ArchLinux.
9+
Description: Redis sessions for Tornado (see GitHub page for more info)
10610
Keywords: pycket redis tornado session python
10711
Platform: UNKNOWN
10812
Classifier: Topic :: Internet :: WWW/HTTP :: Session

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
from setuptools import setup, find_packages
22
import sys, os
33

4-
version = '0.1.1'
5-
6-
f = open(os.path.join(os.path.dirname(__file__), 'README.markdown'))
7-
long_description = f.read()
8-
f.close()
4+
version = '0.1.2'
95

106
setup(name='pycket',
117
version=version,
128
description="Redis sessions for Tornado",
13-
long_description=long_description,
9+
long_description="Redis sessions for Tornado (see GitHub page for more info)",
1410
classifiers=[
1511
'Topic :: Internet :: WWW/HTTP :: Session',
1612
'Topic :: Database',

0 commit comments

Comments
 (0)