Documentation for stdnet 0.8.2. For development docs, go here.

Changelog

Ver. 0.8.2 - 2013 July 4

Ver. 0.8.1 - 2013 July 2

  • C++ redis parser. Requires cython during installation.
  • Primary key can have any name (previously only id was allowed).
  • Better implementation for stdnet.odm.Session.update_or_create().
  • Improved setup.py so that it does not log a python 2 module syntax error when installing for python 3.
  • Custom manager documentation.
  • 590 regression tests with 93% coverage.

Ver. 0.8.0 - 2013 May 24

  • This version brings several new functionalities, bug fixes, asynchronous connections and a departure from the global registration of models.
  • The API for querying, committing and deleting instances has changed, and it it is now based on the stdnet.odm.Router class.
  • A stdnet.odm.Router is a placeholder of registered models for one’s application. Check the registration tutorial for more details.
  • Added preliminary support for mongoDB backend. Pre-alpha at this stage.
  • Added preliminary support for Sql backend. Pre-alpha at this stage.
  • Can handle master/slave server configuration by registering models to a back-end server and read-only server for read operations (queries).
  • Added where selector for ad-hoc queries. The argument is a valid expression (lua for redis and javascript for mongodb).
  • AutoField has been renamed stdnet.odm.AutoIdField and it does not inherit from stdnet.odm.IntegerField so that it can work for different backends.
  • Moved test module into the stdnet.utils.test module and refactored the main test class for handling tests on multiple back-ends at once.
  • stdnet.odm.ManyToManyField field can perform queries on the whole data-set of the model which maintains the many-to-many relationship. To do so, the manager must be accessed via the class rather than an instance. Also the through attribute has been removed as it was equivalent to the model attribute.
  • The load_only query method can be applied to field of related models.
  • The load_related query method can now load only the primary key of the related element.
  • Changed the default value of stdnet.odm.ForeignKey.related_name attribute to accommodate for multiple foreign keys with same related model in the same model.
  • Fixed critical bug in stdnet.odm.ForeignKey with attribute required set to False. Previously the deletion of instances of the related model caused the deletion of the instances pointing to those deleted objects.
  • Minor bug fix in lua odm script when sorting with respect related model fields which are missing.
  • Added the new stdnet.odm.StdModel.get_attr_value() method for retrieving nested attribute values using the (optional) double underscore notation.
  • stdnet.odm.Field.default attribute made read-only.
  • stdnet.odm.Session.add() accept force_update parameter which can be used to force an update rather than an override when an instance is persistent and fully loaded.
  • A new asynchronous redis connection for fully asynchronous usage of the api. Check the asynchronous tutorial for information.
  • Refactored test suite to handle asynchronous and synchronous connections.
  • Redis odm script is able to fix unique-keys/ids conflicts.
  • 578 regression tests with 93% coverage.

Ver. 0.7.0 - 2012 Oct 25

  • It requires redis 2.6 or higher.
  • Supported python versions: 2.6, 2.7, 3.2, 3.3.
  • Some backward incompatible changes in the API and database schema.
  • Tons of new features including a richer query API, improved performance via custom query options, more flexible transactions and lua scripting for redis.
  • The orm module has been renamed odm for object data mapper. This was a painful change with the vast majority of files affected. But it is better to get terminology right at this stage rather than later.
  • Redesign of stdnet.odm.ManyToManyField which now uses a through model for building many to many relationships. This is the only backward incompatible change both in terms of API and database scema.
  • Implemented field lookups gt, ge, lt and le.
  • Added a prefixed redis client in stdnet.lib.redis.PrefixedRedis.
  • Added stdnet.odm.CompositeIdField to handle situations where each combination of given set of stdnet.odm.Field must be unique.
  • Added ability to filter and search on stdnet.odm.ForeignKey fields.
  • Added stdnet.odm.Session for managing transactions in the object data mapper.
  • Moved structures from stdnet.backends to the stdnet.odm module.
  • Added stdnet.odm.Query.load_only() and stdnet.odm.Query.dont_load() methods for loading a subset of a model fields. This can improve performance by reducing the amount of data transferred from the server to the client. Check the performance tips regarding the new feature.
  • Added stdnet.odm.Query.load_related() for loading related fields of a queryset with a single database query. This can have huge performance benefits when you know you are going to access the related field in your model.
  • Fixed bug in related managers. The exclude method was not implemented.
  • stdnet.odm.PickleObjectField uses the pickle protocol 2 for compatibility between python 2 and python 3.
  • Refactored the save and delete method of model instances.
  • Added stdnet.odm.StdModel.tojson() method for obtaining JSON representation of model instances.
  • Indexes for stdnet.odm.ForeignKey fields are stored at sets with keys obtained from the field attrname rather than name.
  • Added stdnet.odm.StdModel.clone() method for cloning model instances.
  • Refactored transactions to be used with remote data structures and structured fields.
  • pulsar or nose are required to run the test suite and unittest2 is required if using python 2.6.
  • Moved the contrib module to stdnet.apps.
  • Added stdnet.utils.dates.
  • Added stdnet.utils.path.
  • Added a Lua test suite for testing stand alone scripts. Requires lunatest.
  • Serialisation works for stdnet.odm.ManyToMany.through models via the stdnet.odm.all_models_sessions() function (issue #48).
  • Lua script for univariate timeseries. This means the standard redis distribution works with the stdnet.odm.TS structure.
  • PEP 386-compliant version number.
  • 624 regression tests with 92% coverage.

Ver. 0.6.2 - 2011 Nov 14

  • Critical bug fix in delete method when a model has no indices.
  • Critical bug fix in stdnet.odm.ManyToManyField which was causing the model delete method to crash.
  • 297 regression tests with 78% coverage.

Ver. 0.6.1 - 2011 Sep 10

  • This is a minor release which brings an improved documentation, better support for the stdnet.odm.JSONField and some minor bug fixes.
  • Test suite parsing is done using the new python argparse module since the optparse is now deprecated. Check running tests for more information.
  • Started work on lua extensions and added a development test tag script.
  • Added google analytics to the documentation web site.
  • The instance validation algorithm catches stdnet.FieldValueError exceptions and stores them into the errors dictionary.
  • Fixed bug in stdnet.odm.Field when using default values. Default values are regenerated if missing during the saving algorithm.
  • Refactored redisinfo for a better redis monitor.
  • 297 regression tests with 78% coverage.

Ver. 0.6.0 - 2011 Aug 9

  • New database schema incompatible with previous versions.
  • This is a major release which brings into production a vast array of important new features including an improved database schema.
  • stdnet.odm.StdModel instances are mapped into separate redis hash tables with fields given by the model field names and values given by the instance field values.
  • Implemented two types of sorting: Implicit by the stdnet.odm.Metaclass attribute ordering. When using this route, items are stored in the database in a sorted fashion, therefore no overhead is required for the sorting step. Explicit by using the sort_by method in a stdnet.odm.query.QuerySet object. Check the sorting documentation for more information.
  • Unique fields (fields with stdnet.odm.Field.unique set to True) are now indexed via redis hash tables which maps the field value to the object id. Previously they were stored in keys. This solution reduces the memory footprint and the number of keys used.
  • Added transaction support. This way model instances are always consistent even when redis shuts down during an update. Transactions are also useful when updating several instances at once.
  • Added serialization utilities for saving model data in JSON or CSV format. Custom serialization algorithms can be added to the library.
  • Data encoders have been moved to the stdnet.utils.encoders module. There are four available, a dummy one (no encoding), Default to and from unicode and bytes, Bytes to and from bytes, PythonPickle to and from object and their pickle (bytes) representation and Json to and from structures and bytes.
  • Added as_string parameter to stdnet.odm.JSONField for specifying the storage method.
  • Moved testing functions into the stdnet.test module.
  • Added hidden attribute to stdnet.odm.Field. Used in the search algorithm.
  • Reorganized and expanded documentation.
  • Bug fix in stdnet.odm.PickleObjectField field.
  • 289 regression tests with 78% coverage.

Ver. 0.5.5 - 2011 June 6

  • Several new features, some important bug fixes and more tests.
  • Added stdnet.odm.from_uuid() function which can be used to retrieve a model instance from its universally unique identifier.
  • Added pickle support to models. The __getstate__ method return a tuple containg id and a dictionary representation of scalar fields (obtained from the todict method).
  • Bug Fix in stdnet.odm.JSONField.
  • Added tests for timeseries with date as keys (rather than datetimes).
  • Bug fix in Backend and test suite, Redis port was not read.
  • Bug fix in stdnet.contrib.timeseries. The models were overridding the __str__() rather than __unicode__().
  • Added stdnet.odm.flush_models(), a utility functions for flushing model data.
  • Added a new stdnet.odm.ByteField which saves bytes rather than strings.
  • Renamed start and end in TimeSeres to data_start and data_end.
  • 245 regression tests with 76% coverage.

Ver. 0.5.4 - 2011 May 18

  • Another bug fixing release with a couple of new functionalities and a new contrib application.
  • Fixed a filtering problem when performing exclude on unique fields.
  • Refactored registration utilities.
  • Added stdnet.odm.test_unique() for testing uniqueness.
  • Removed tagging from contrib and included in the contrib.searchengine. The search engine application has been refactored so that it can perform a fast, fuzzy, full text index using Redis.
  • Added pre_save and post_save signals.
  • Added pre_delete and post_delete signals.
  • Bug fix on disptach module which was failing when using python 3.
  • Several more tests.
  • 218 regression tests with 73% coverage.

Ver. 0.5.3 - 2011 Apr 30

  • Fixed problem in setup.py.
  • Added remove method to stdnet.odm.ManyToManyField and fixed a bug on the same field.
  • 203 regression tests with 71% coverage.

Ver. 0.5.2 - 2011 Mar 31

  • This version brings some important bug fixes with tests.
  • Bug fix in stdnet.odm.IntegerField.to_python().
  • Added registration utilities in stdnet.odm.
  • Bug fix in stdnet.odm.StdModel class caused by the lack of a __ne__ operator.
  • Added __hash__ operator, unique across different models, not just instances.
  • Added experimental stdnet.contrib.searchengine application. Very much alpha.
  • Added scorefun callable in structures to be used in OrderedSet.
  • Added a spelling example.
  • 198 regression tests (including timeseries) with 71% coverage.

Ver. 0.5.1 - 2011 Feb 27

  • Mainly bug fixes, documentations and more tests (improved coverage).
  • Modified the parse_info method in stdnet.lib.redis. Its now compatible with redis 2.2.
  • Added documentation for Redis timeseries.
  • Added a command to stdnet.contrib.monitor, a stdnet application for djpcms.
  • Critical Bug fix in redis backend save_object attribute. This bug was causing the deletion of related objects when updating the value of existing objects.
  • Added licences to the stdnet.dispatch and stdnet.lib.redis module.
  • 177 regression tests, 189 with timeseries with 67% coverage.

Ver. 0.5.0 - 2011 Feb 24

  • Ported to python 3 and dropped support for python 2.5.

  • Removed dependency from redis-py for python 3 compatibility.

  • Refactored the object data mapper, including several bug fixes.

  • Added benchmark and profile to tests. To run benchmarks or profile:

    python runtests.py -t bench
    python runtests.py -t bench tag1 tag2
    python runtests.py -t profile
  • Included support for redis timeseries which requires redis fork at https://github.com/lsbardel/redis.

  • Added stdnet.contrib.sessions module for handling web sessions. Experimental and pre-alpha.

  • Added stdnet.odm.JSONField with tests.

  • 167 regression tests with 61% coverage.

Ver. 0.4.2 - 2010 Nov 17

  • Added tags in tests. You can now run specific tags:

    python runtests.py hash

    will run tests specific to hashtables.

  • Removed ts tests since the timeseries structure is not in redis yet. You can run them by setting tag ts.

  • 54 tests.

Ver. 0.4.1 - 2010 Nov 14

  • Added CONTRIBUTING to distribution.
  • Corrected spelling error in Exception ObjectNotFound exception class.
  • Added initial support for Map structures. Ordered Associative Containers.
  • 63 tests

Ver. 0.4.0 - 2010 Nov 11

  • Development status set to beta.

  • This version is incompatible with previous versions.

  • Documentation hosted at github.

  • Added new contrib module djstdnet which uses djpcms content management system to display an admin interface for a stdnet.odm.StdModel. Experimental for now.

  • Added stdnet.CacheClass which can be used as django cache backend. For example, using redis database 11 as cache is obtained by:

    CACHE_BACKEND = 'stdnet://127.0.0.1:6379/?type=redis&db=11&timeout=300'
    
  • Overall refactoring of stdnet.odm and stdnet.backends modules.

  • Lazy loading of models via the stdnet.dispatch module.

  • Added stdnet.dispatch module from django.

  • Added stdnet.odm.AtomField subclasses.

  • Before adding elements to a stdnet.odm.MultiField the object needs to be saved, i.e. it needs to have a valid id.

  • Made clear that stdnet.odm.StdModel classes are mapped to stdnet.HashTable structures in a stdnet.BackendDataServer.

  • Moved structures module into backends directory. Internal reorganisation of several modules.

  • Added app_label attribute to stdnet.odm.DataMetaClass.

  • 47 tests

Ver. 0.3.3 - 2010 Sep 13

  • If a model is not registered and the manager method is accessed, it raises ModelNotRegistered
  • Changed the way tests are run. See documentation
  • redis set as requirements
  • 29 tests

Ver. 0.3.2 - 2010 Aug 24

  • Bug fixes
  • Fixed a bug on odm.DateField when required is set to False
  • Changelog included in documentation
  • 27 tests

Ver. 0.3.1 - 2010 Jul 19

  • Bug fixes
  • 27 tests

Ver. 0.3.0 - 2010 Jul 15

  • Overall code refactoring.
  • Added ListField and OrderedSetField with Redis implementation
  • StdModel raise AttributError when method/attribute not available. Previously it returned None
  • StdModel raise ModelNotRegistered when trying to save an instance of a non-registered model
  • 24 tests

Ver. 0.2.2 - 2010 Jul 7

  • RelatedManager is derived by Manager and therefore implements both all and filter methods
  • 10 tests

Ver. 0.2.0 - 2010 Jun 21

  • First official release in pre-alpha
  • Redis backend
  • Initial ORM with AtomField, DateField and ForeignKey
  • 8 tests