Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81957
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'interpreter': 0.05; 'say,': 0.05; 'result,': 0.07; 'socket': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rewrite': 0.09; 'separately': 0.09; 'thrown': 0.09; 'wrapper': 0.09; 'yeah,': 0.09; 'api': 0.11; 'python': 0.11; 'language.': 0.14; 'changes': 0.15; 'windows': 0.15; 'feeding': 0.16; 'imports': 0.16; 'invoking': 0.16; 'layers.': 0.16; 'operation.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'repeatedly.': 0.16; 'specifying': 0.16; 'sqlalchemy,': 0.16; 'sqlite': 0.16; 'subject:ORM': 0.16; 'language': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'server,': 0.19; '(the': 0.22; 'import': 0.22; 'header:User- Agent:1': 0.23; 'certainly': 0.24; 'driver': 0.24; 'module,': 0.24; 'propose': 0.24; 'fine': 0.24; 'regardless': 0.24; "i've": 0.25; 'script': 0.25; 'changes,': 0.26; 'switch': 0.26; 'certain': 0.27; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; '(this': 0.29; 'code': 0.31; 'feeds': 0.31; 'overhead': 0.31; 'probably': 0.32; 'minimal': 0.33; 'could': 0.34; "can't": 0.35; 'tool': 0.35; 'done.': 0.35; 'but': 0.35; 'opposed': 0.36; 'done': 0.36; 'doing': 0.36; 'next': 0.36; 'should': 0.36; 'effort': 0.37; 'tasks': 0.38; 'to:addr :python-list': 0.38; 'little': 0.38; 'anything': 0.39; 'extremely': 0.39; 'heard': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'easy': 0.60; 'life,': 0.60; 'information,': 0.61; "you're": 0.61; 'first': 0.61; 'back': 0.62; "you've": 0.63; 'real': 0.63; 'such': 0.63; 'our': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'here': 0.66; 'benefit': 0.68; 'jobs': 0.68; 'to,': 0.72; 'truth': 0.81; 'about?': 0.84; 'around,': 0.84; 'enduring': 0.84; 'subject:opinion': 0.84; 'suits': 0.84; 'directly.': 0.95 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: ORM opinion |
| Date | Thu, 04 Dec 2014 23:32:30 +0000 |
| References | <CAPTjJmrix4KtLwf4S6kDHYsNLGT5KdYxhrju-0rS8GOyJGa9CQ@mail.gmail.com> <1417735208769.37132@activenetwerx.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | host-78-147-16-114.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
| In-Reply-To | <1417735208769.37132@activenetwerx.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16594.1417735967.18130.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1417735967 news.xs4all.nl 2955 [2001:888:2000:d::a6]:55363 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Bytes | 6105 |
| X-Received-Body-CRC | 2219534571 |
| Xref | csiph.com comp.lang.python:81957 |
Show key headers only | View raw
On 04/12/2014 23:20, Joseph L. Casale wrote: >> First recommendation: Less layers. Instead of SQLAlchemy, just import >> sqlite3 and use it directly. You should be able to switch out "import >> sqlite as db" for "import psycopg2 as db" or any other Python DB API >> module, and still have most/all of the benefit of the extra layer, >> without any extra imports. > > Yeah, I am a fan of apsw but this is what I have now done. While I am > fine with writing my own abstractions, its certainly less overhead using > an orm. > >> Secondly, see if you can keep the Python process running, instead of >> separately invoking it for every operation. This will mean some >> structural changes, but if you're specifying Python as the plugin >> interpreter (as opposed to, say, "execute this program with these >> args", which is far more general), you can probably set up a wrapper >> script that calls on the user code repeatedly. Perhaps you could have >> a multiprocessing.Queue feeding tasks to the subprocess, via a little >> parent Python process. If you can't make those kinds of changes to the >> application, the next best would be a stubby driver process that feeds >> jobs to your real subprocess; the real work might be done by a >> Unix/TCP socket server, and the stub connects, feeds it some >> information, gets back a result, and disconnects. The stub will have >> an extremely minimal set of imports (the bear necessities of life, if >> you like), and the real process can import as much as it likes, >> because it won't be doing it for every operation. > > I am stuck with the current architecture, but the idea you propose has > been thrown around, truth is I am not certain if we are enduring the > effort of such a large rewrite that Python is the tool to use (this is a > Windows application) but regardless your idea is one that is proposed. > > Thanks, > jlc > Anything listed here http://www.pythoncentral.io/sqlalchemy-vs-orms/ you've not heard about? I found peewee easy to use although I've clearly no idea if it suits your needs. There's only one way to find out :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: ORM opinion Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-12-04 23:32 +0000
csiph-web