[tornado] Request for feedback: Momoko 1.0.0b1

373 views
Skip to first unread message

Frank Smit

unread,
Dec 16, 2012, 3:52:53 PM12/16/12
to python-...@googlegroups.com
Hi,

I made time for finishing Momoko's rewrite and most of it is done now.
Enough for a first beta. There are some more advanced feature I would
like to add like asynchronous notifications, named cursors and COPY TO
and COPY FROM, but I'm not sure if any one would use these. Not me at
the moment.

It hasn't been uploaded to PyPi yet, because the lack of documentation
and testing. The unit test all run, but that doesn't make it
production ready.

The changes for this beta release are listed here:
https://github.com/FSX/momoko/blob/master/changelog.rst

And example code here:
https://github.com/FSX/momoko/blob/master/examples/gen_example.py

Frank Smit

unread,
Jan 19, 2013, 12:40:50 PM1/19/13
to python-...@googlegroups.com
Ok, I'll make that the last feature to implement before the stable
release. After that's done only some documentation is left.

Thanks for the feedback!

On Sat, Jan 19, 2013 at 5:50 AM, mrobellard <mi...@robellard.com> wrote:
> COPY FROM would be most useful as it is the fastest way to bulk insert
> records into the database. Out of the features you listed I would put this
> at the top.
>
> Thanks for all your hard work. I have been using Momoko with my apps I have
> been working on for a few months now, and haven't run into any major issues.

Frank Smit

unread,
Jan 19, 2013, 7:46:37 PM1/19/13
to python-...@googlegroups.com
I've looked into this feature and it's harder than I thought. I only
examined the "COPY FROM" part, because the "COPY TO" is not much
different (from a high-level viewpoint). And I did not examine
everything in detail, but just enough to see how it basically works.

COPY FROM/TO using a file path should work fine, but the file would be
read or written by the database server and not the client. Would be
nicer if you can open a file in Python and feed it to the database
like you can do in "normal" Psycopg2.

What Psycopg2 does in case of COPY FROM is using STDIN and not a file
path. And uses `PQputCopyData` from libpq to write the data from the
file to the connection. This functionality is not exposed to Python
(couldn't find it). That's problem one. The Second problem is you
can't read or write files in a non-blocking way in Tornado.

Frank Smit

unread,
Feb 28, 2013, 2:24:32 PM2/28/13
to python-...@googlegroups.com
Hi,

I've tagged the second beta. Why another beta? I replaced the dynamic
pool with a static one. I think it needs some more testing.

This will be the last beta and I'll start working on new features soon.

- Tested on CPython 2.6, 2.7, 3.2, 3.3 and PyPy with Psycopg2,
psycopg2ct and psycopg2cffi.
- Add and remove a database connection to and from the IOLoop for
each operation. See pull request 38 and commits 189323211b and
92940db0a0 for more information.
- Replaced dynamic connection pool with a static one.
- Add support for hstore.

Download: https://github.com/FSX/momoko/archive/v1.0.0b2.tar.gz
Documentation: https://momoko.readthedocs.org/en/latest/index.html

Peter Bengtsson

unread,
Mar 1, 2013, 4:54:48 PM3/1/13
to python-...@googlegroups.com
Isn't `momoko.Pool` deprecated now?

I'm looking at the "Boilerplate" section on
https://momoko.readthedocs.org/en/latest/tutorial.html
where it does `application.db = momoko.Pool(`

Peter Bengtsson

unread,
Mar 1, 2013, 5:26:55 PM3/1/13
to python-...@googlegroups.com
Ignore me. I got the wrong version installed and got all confused.

Frank Smit

unread,
Mar 1, 2013, 6:39:21 PM3/1/13
to python-...@googlegroups.com
:)
> --
> You received this message because you are subscribed to the Google Groups
> "Tornado Web Server" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-tornad...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Frank Smit

unread,
May 1, 2013, 4:15:19 AM5/1/13
to python-...@googlegroups.com
I've uploaded 1.0.0 on PyPi.
Reply all
Reply to author
Forward
0 new messages