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


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

SQLObject 3.9.1

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.1
Date Sat, 27 Feb 2021 15:16:28 +0100
Lines 118
Approved python-announce-list@python.org
Message-ID <20210227141628.GA14947@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 R8kPMOAcbAqei5YonyMftgnrTa/1BL9zL88onDJDoqaA==
Authentication-Results mail.python.org; dkim=none reason="no signature"; dkim-adsp=unknown (unprotected policy); dkim-atps=neutral
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'skip:= 10': 0.04; 'tests': 0.05; '2.7': 0.09; 'adapt': 0.09; 'instances': 0.09; 'meant': 0.09; 'module.': 0.09; 'skip:` 10': 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.14; 'python': 0.15; '3.4': 0.16; '3.5.': 0.16; '3.9': 0.16; '=======': 0.16; 'changes:': 0.16; 'classes,': 0.16; 'mssql': 0.16; 'refactor': 0.16; 'required.': 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; 'urls': 0.16; 'announce': 0.16; 'url:listinfo': 0.16; 'version': 0.21; 'to:addr:python-list': 0.22; 'url-ip:188.166/16': 0.23; "what's": 0.23; 'list,': 0.23; 'run': 0.25; '>>>': 0.26; 'skip:p 30': 0.26; 'programmers': 0.27; 'url:lists': 0.27; 'url-ip:188/8': 0.29; 'mailing': 0.31; 'header :User-Agent:1': 0.31; 'raise': 0.32; 'received:188.166': 0.32; "i'm": 0.33; 'class': 0.33; 'change': 0.35; 'release': 0.35; 'those': 0.37; 'hello!': 0.38; 'build': 0.38; 'example': 0.38; 'use': 0.38; 'started': 0.39; 'where': 0.39; 'skip:o 10': 0.62; 'true': 0.64; 'your': 0.65; 'complete': 0.65; 'url:name': 0.65; 'url:net': 0.67; 'pleased': 0.68; '-----': 0.70; 'site:': 0.70; 'news': 0.70; 'easy': 0.74; 'known': 0.75; 'database': 0.76; 'quick': 0.79; 'drivers': 0.84; 'minor': 0.84; 'news:': 0.84; 'tables': 0.84; 'url-ip:216.105.38.10/32': 0.84; 'return.': 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 RSS6JN7526M65HRCCBZHDH62OVWCRJJC
X-Message-ID-Hash RSS6JN7526M65HRCCBZHDH62OVWCRJJC
X-Mailman-Approved-At Sat, 27 Feb 2021 09:18:43 -0500
X-Mailman-Version 3.3.4b1
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/RSS6JN7526M65HRCCBZHDH62OVWCRJJC/>
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-Owner <mailto:python-announce-list-owner@python.org>
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:3592

Show key headers only | View raw


Hello!

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


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

Drivers
-------

* Adapt to the latest ``pg8000``.

* Protect ``getuser()`` - it can raise ``ImportError`` on w32
  due to absent of ``pwd`` module.

Build
-----

* Change URLs for ``oursql`` in ``extras_require`` in ``setup.py``.
  Provide separate URLs for Python 2.7 and 3.4+.

* Add ``mariadb`` in ``extras_require`` in ``setup.py``.

CI
--

* For tests with Python 3.4 run ``tox`` under Python 3.5.

Tests
-----

* Refactor ``tox.ini``.

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.

SQLObject supports a number of backends: MySQL, PostgreSQL, 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.1

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.1 Oleg Broytman <phd@phdru.name> - 2021-02-27 15:16 +0100

csiph-web