Framework free Authentication Methods for CGI scripts
Includes the following classes:The Cookie and Hidden classes use JavaScript/SHA1 hashing to avoid sending passwords as clear text.
- `BasicAuth' which depends on web server "Basic" authentication
- cookie based classes `SessionCookieAuth' and `StatelessCookieAuth'
- Hidden field based classes `SessionHiddenAuth' and `StatelessHiddenAuth'
Utility routines to easily make IPv4 and IPv6 TCP and UDP socket connections.
Follow class implements "tail -f" functionality to incrementally read text and binary files as they grow.
JSON Storage Access Methods is a library for storage and retrieval of JavaScript Object Notation (JSON) encoded objects.Backends include:
- file: directory of plain text JSON files
- rcs: directory of plain text JSON files under RCS
- cvs: directory of plain text JSON files under CVS (not tested)
- svn: directory of plain text JSON files under SVN (not tested)
- sqlite: object trees stored in an SQLite3 database
- mysql: object trees stored in a MySQL database (lightly tested)
- pgsql: object trees stored in a PostgreSQL database (lightly tested)
Lookup methods include:
- Collections: a jQuery-like method-chained interface
- XPath-like query language (only supported for SQL backends)
- P4J (E4X-like) query language (only supported for SQL backends) which allows construction of "xpath" queries in Python using method chaining and operator overload, bridging the lexical divide between code and query.
NOTE:
Uses 2.6+ supplied "json"; requires "simplejson" on Python 2.5. File-based storage depends on POSIX file semantics.
Requires "MySQLdb" for MySQL.
Requires "psycodb2" for PostgreSQL.The name is a joke on IBM Mainframe data Access Methods (BDAM, BSAM, VSAM, ISAM, QSAM, BPAM). The obvious name 'jsonstore' was already taken by another package in the Python Package Index (PyPI).
JSONPath is an XPath-like tool for JSON. See http://goessner.net/articles/JsonPath/ for information on the original (JavaScript) implementation.This version based Based on JavaScript version by Stefan Goessner at http://code.google.com/p/jsonpath/ and the Perl version by Kate Rhodes at http://github.com/masukomi/jsonpath-perl/tree/master.
NOTE WELL: "predicates" are evaluated using the Python
eval()
function, which is scary-dangerous. I made an effort to translate JavaScript syntax to Python for common cases, but it's easy to break. I regard this as a toy. The "JSAM" package (above) takes a different approach, storing JSON objects as trees in an SQL database, and executing XPath queries using SQL.
mimeattachement create a MIME attachment for an arbitrary file. Takes a pathname (or file pointer and filename) and returns a "message object model" object for a MIME Attachment.
The packet module is a front-end to the struct module. It allows the user to define a packet format, and to create a Python class to represent those packets with named attributes for each packet field.# demo: make an IP packet packer/unpacker # IP Prototype ipp = Prototype() ipp.add_uint8('vhl') ipp.add_uint8('tos') ipp.add_uint16('len') ipp.add_uint16('id') ipp.add_uint16('off') ipp.add_uint8('ttl') ipp.add_uint8('p') ipp.add_uint16('sum') ipp.add_uint32('src') ipp.add_uint32('dst') IP = ipp.klass('IP', NETWORK) del ipp # .... # create an IP packet instance from bytes packet = IP(bytes)
sendmail is a package to invoke the POSIX "sendmail" program to queue e-mail, with an smtplib compatible API.
SPIPAT is a package that adds SNOBOL4/SPITBOL style patterns to Python as composable objects.Patterns can be composed with other Patterns and strings using the '+' and '|' operators.
Based on a C-language translation of the GNU Ada (GNAT) package by the original creator of SPITBOL.