SQLObject v1.1 publishes the Python database object mapping framework

Source: Internet
Author: User
Keywords Python sqlobject Object Mapping
Tags class framework functions install it is object mapping object relational mapping objects

SQLObject 1.1.0 release, SQLObject is a popular Python database object mapping framework, the mapping rule is table-> class, Field-> properties.

The Object Relational Mapping tool helps increase productivity by providing classes and objects to manipulate database tables. Python's Best object-relational mapping tool is sqlobject--an open source project that almost completes all the operations required by the programming database. This article introduces SQLObject and its functions. After reading this article, you will be able to connect Python to the database without writing any SQL code.

Object-relational mappings are typically seen when object-oriented programming paradigms satisfy the relational paradigm of most databases. Object-relational mapping is a bridge between the two worlds. It allows you to define a class that corresponds to a database table. You can then use the methods on these classes and their instances to interact with the database without writing SQL. Using object-relational mapping does not mean that you don't need to know how the http://www.aliyun.com/zixun/aggregation/22.html "> relational database works, but you don't need to write SQL to avoid programming errors."

You can find a dozen or more open source Python packages that operate SQL databases, which does not include special-purpose modules for connecting Python to a particular database. SQLObject is one of the best modules. It is a simple and Easy-to-use complete Object Relational mapping package. SQLObject can almost complete all the operations required for the programming database.

SQLObject 1.1 Release Notes:

Features & Interface

Selectresults (returned from. Select ()) are even in (column, list). A different workaround is used into sqliteconnection to prevent pysqlite from converting strings to unicode-in the case of a regist Ered Text conversion function Pysqlite silently converts empty to strings; Now SQLObject uses text_factory instead and properly returns empty. It is now possible to declare one encoding for all Unicodecol ' s per table (as sqlmeta.dbencoding) or/per connection (as connection.dbencoding). Default (if dbencoding is found neither in column nor in table nor in connection) is ' Utf-8 '.

Source Code and Internals

Decorators @classmethod and @staticmethod are used everywhere. All ' Mydict.has_key (name) ' Geom were replaced with ' name in Mydict '.

Installation Instructions:

Can install the latest release with:

Easy_install-u SQLObject

Can install the latest version of SQLObject with:

Easy_install Sqlobject==dev

Can install the latest bug fixing branch with:

Easy_install Sqlobject==bugfix

If you are want to require a specific revision (because, for instance, you need a bugfix this hasn't ' t appeared in a release), can This in your setuptools using setup.py file:

Setup (... install_requires=["sqlobject==bugfix,>=0.7.1dev-r1485"]
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.