Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #3545

SQLObject 3.9.0

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Oleg Broytman <phd@phdru.name>
Newsgroups comp.lang.python.announce
Subject SQLObject 3.9.0
Date Tue, 15 Dec 2020 15:22:43 +0100
Lines 121
Approved python-announce-list@python.org
Message-ID <20201215142243.GA30282@phdru.name> (permalink)
Reply-To python-list@python.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace news.uni-berlin.de QPUC1NzFumxU37HRb/0LzA9XgkFJL7hm8nCS8hrPZ06w==
Authentication-Results mail.python.org; dkim=none reason="no signature"; dkim-adsp=unknown (unprotected policy); dkim-atps=neutral
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'skip:= 10': 0.04; 'tests': 0.05; '2.7': 0.09; 'bool,': 0.09; 'instances': 0.09; 'json': 0.09; 'meant': 0.09; 'skip:` 10': 0.09; 'skip:` 20': 0.09; 'to:addr :python-announce-list': 0.09; 'url-ip:151.101.0.223/32': 0.09; 'url-ip:151.101.128.223/32': 0.09; 'url-ip:151.101.192.223/32': 0.09; 'url-ip:151.101.64.223/32': 0.09; 'url:mailman': 0.09; 'import': 0.15; 'python': 0.15; '--------': 0.16; '3.9': 0.16; '=======': 0.16; 'changes:': 0.16; 'classes,': 0.16; 'column': 0.16; 'columns': 0.16; 'float,': 0.16; 'int,': 0.16; 'mssql': 0.16; 'required.': 0.16; 'travis': 0.16; 'url-ip:151.101.1.69/32': 0.16; 'url-ip:151.101.129.69/32': 0.16; 'url- ip:151.101.193.69/32': 0.16; 'url-ip:151.101.65.69/32': 0.16; 'url:project': 0.16; 'url:pypi': 0.16; 'url:questions': 0.16; 'url:stackoverflow': 0.16; 'announce': 0.16; 'url:listinfo': 0.16; 'list,': 0.19; 'bug': 0.20; 'requires': 0.21; 'version': 0.21; 'to:addr:python-list': 0.22; 'url-ip:188.166/16': 0.23; "what's": 0.23; 'run': 0.25; '>>>': 0.26; 'skip:p 30': 0.26; 'programmers': 0.27; 'url:lists': 0.27; "doesn't": 0.28; 'mailing': 0.29; 'url- ip:188/8': 0.29; 'old': 0.32; 'using': 0.32; 'received:188.166': 0.32; 'header:User-Agent:1': 0.32; "i'm": 0.33; 'objects': 0.33; 'reported': 0.33; 'class': 0.33; 'release': 0.35; 'those': 0.36; 'currently': 0.37; 'hello!': 0.38; 'use': 0.38; 'started': 0.39; 'where': 0.39; 'content-disposition:inline': 0.61; 'skip:o 10': 0.62; 'michael': 0.62; 'true': 0.64; 'your': 0.65; 'url:name': 0.66; 'url:net': 0.66; 'pleased': 0.68; 'complete': 0.69; 'site:': 0.70; 'features': 0.74; 'news': 0.74; 'known': 0.76; 'database': 0.76; 'easy': 0.77; 'quick': 0.79; 'drivers': 0.84; 'jerry': 0.84; 'news:': 0.84; 'tables': 0.84; 'url-ip:216.105.38.10/32': 0.84; 'return.': 0.91; 'universal': 0.91; 'url:news': 0.93
Content-Disposition inline
X-Attribution phd
X-Face "4chVP^f8;3Bi>x"ic0%DuP(ZLyn:;kzQ1njs]5,GRZG<{<\~`|Shxi7|)d|8uO~HFRfyym {[xs@OYG]2Q]0#}0sjJp`1^1+B6]A2+{9fW=S<O7^"hul]^|AGtiI7SkYF-2VD?UH*h_!zuCIf+^F7 c0x8?W,UfhCAx^YY#1ALhvG\2yG}LW:)zw#1;Yajq"hK~S
X-Operating-System Debian GNU/Linux
X-Url https://phdru.name/
Mail-Followup-To Oleg Broytman <phd@phdru.name>, Python Mailing List <python-list@python.org>
X-Skip-DKIM-Sig mailing list
User-Agent Mutt/1.10.1 (2018-07-13)
X-MailFrom phd@phdru.name
X-Mailman-Rule-Hits emergency
X-Mailman-Rule-Misses dmarc-mitigation; no-senders; approved
Message-ID-Hash JXQMYANE255B5MOLDO7SX6D2GVB3ARPX
X-Message-ID-Hash JXQMYANE255B5MOLDO7SX6D2GVB3ARPX
X-Mailman-Approved-At Tue, 15 Dec 2020 09:36:17 -0500
X-Mailman-Version 3.3.3b1
Precedence list
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
Archived-At <https://mail.python.org/archives/list/python-announce-list@python.org/message/JXQMYANE255B5MOLDO7SX6D2GVB3ARPX/>
List-Archive <https://mail.python.org/archives/list/python-announce-list@python.org/>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Post <mailto:python-announce-list@python.org>
List-Subscribe <mailto:python-announce-list-join@python.org>
List-Unsubscribe <mailto:python-announce-list-leave@python.org>
Xref csiph.com comp.lang.python.announce:3545

Show key headers only | View raw


Hello!

I'm pleased to announce version 3.9.0, the first release
of branch 3.9 of SQLObject.


What's new in SQLObject
=======================

Contributors for this release are:

+ Michael S. Root, Ameya Bapat - ``JSONCol``;

+ Jerry Nance - reported a bug with ``DateTime`` from ``Zope``.

Features
--------

* Add ``JSONCol``: a universal json column that converts simple Python objects
  (None, bool, int, float, long, dict, list, str/unicode to/from JSON using
  json.dumps/loads. A subclass of StringCol. Requires ``VARCHAR``/``TEXT``
  columns at backends, doesn't work with ``JSON`` columns.

* Extend/fix support for ``DateTime`` from ``Zope``.

* Drop support for very old version of ``mxDateTime``
  without ``mx.`` namespace.

Drivers
-------

* Support `mariadb <https://pypi.org/project/mariadb/>`_.

CI
--

* Run tests with Python 3.9 at Travis and AppVeyor.

For a more complete list, please see the news:
http://sqlobject.org/News.html


What is SQLObject
=================

SQLObject is an object-relational mapper.  Your database tables are described
as classes, and rows are instances of those classes.  SQLObject is meant to be
easy to use and quick to get started with.

It currently supports MySQL, PostgreSQL and SQLite; connections to other
backends - Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB) - are
lesser debugged).

Python 2.7 or 3.4+ is required.


Where is SQLObject
==================

Site:
http://sqlobject.org

Development:
http://sqlobject.org/devel/

Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss

Download:
https://pypi.org/project/SQLObject/3.9.0

News and changes:
http://sqlobject.org/News.html

StackOverflow:
https://stackoverflow.com/questions/tagged/sqlobject


Example
=======

Create a simple class that wraps a table::

  >>> from sqlobject import *
  >>>
  >>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
  >>>
  >>> class Person(SQLObject):
  ...     fname = StringCol()
  ...     mi = StringCol(length=1, default=None)
  ...     lname = StringCol()
  ...
  >>> Person.createTable()

Use the object::

  >>> p = Person(fname="John", lname="Doe")
  >>> p
  <Person 1 fname='John' mi=None lname='Doe'>
  >>> p.fname
  'John'
  >>> p.mi = 'Q'
  >>> p2 = Person.get(1)
  >>> p2
  <Person 1 fname='John' mi='Q' lname='Doe'>
  >>> p is p2
  True

Queries::

  >>> p3 = Person.selectBy(lname="Doe")[0]
  >>> p3
  <Person 1 fname='John' mi='Q' lname='Doe'>
  >>> pc = Person.select(Person.q.lname=="Doe").count()
  >>> pc
  1

Oleg.
-- 
    Oleg Broytman            https://phdru.name/            phd@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

SQLObject 3.9.0 Oleg Broytman <phd@phdru.name> - 2020-12-15 15:22 +0100

csiph-web