Ian Bicking | 10 Mar 22:45 2005

Re: [chiPy] pypi

Brant Harris wrote:
> Weren't we going to discuss PyPI over at catalog-sig?  Not like I
> care, I'm good with whateva'.

I was going to write up something specific to what we've done, but I 
haven't.  But what they hey, I'll just copy this over; this is all in 
reference to code we (ChiPy people) have in an svn repository: 
http://lonelylion.com/chipy/pypi/

-- I started moving things to ZPT templates, Brian Ray started 
documenting the database and building some tools around it (I'm not 100% 
clear there), and several people have added an xmlrpc interface to build 
a command-line client, which is what the rest of Brant's email involves...

> I had some ideas for the PyPI client package... Here's the basic API
> layout idea.  Just brainstorming, really.  Everything would sit in the
> pypi module, or perhaps pypi.client:
> 
> def search(*args, **kw):
>     """
>     Return a list of packages with the first argument as a search string.
>     Specific attributes can be searched with keyword arguments.
>     """
>            
> def install(package, silently=0):
>     """
>     Downloads a package and then runs "setup.py build" and "setup.py
> install" on the
>     sucker.
>     The <silenty> would do so without outputing any info, so that a
(Continue reading)

Ian Bicking | 14 Mar 09:02 2005

PyPI WSGI frontend

I implemented PyPI as a WSGI application.  It's fairly trivial, and 
doesn't effect anything except pypi.cgi (actually doesn't effect that 
file, but is an alternative to that code).  The WSGI version is here:

   http://lonelylion.com/chipy/pypi/pypi_wsgi.py

And the CGI version I based it on (only slightly different from CVS):

   http://lonelylion.com/chipy/pypi/pypi_cgi.py

I'm not 100% sure if PyPI is threadsafe, or serves multiple requests 
from a single process properly, but I haven't seen anything that would 
make me expect a problem.  So this should be sufficient to get it to run 
under mod_python or Twisted or whatever.

--

-- 
Ian Bicking  /  ianb <at> colorstudy.com  / http://blog.ianbicking.org
Richard Jones | 15 Mar 09:34 2005
Picon

Re: PyPI WSGI frontend


On Mon, 14 Mar 2005 07:02 pm, Ian Bicking wrote:
> I implemented PyPI as a WSGI application.

Now I need to read up on WSGI :)

Knowing nothing about it, does creosote have WSGI support?

> I'm not 100% sure if PyPI is threadsafe

I believe it is as long as the sqlite build is threadsafe. One thing I will 
try to achieve during the pre-PyCon sprinting is migrating to PostgreSQL 
(since the psql database is already set up and waiting).

    Richard
Richard Jones | 15 Mar 09:37 2005
Picon

Re: Re: [chiPy] pypi


On Fri, 11 Mar 2005 08:45 am, Ian Bicking wrote:
> I was going to write up something specific to what we've done, but I
> haven't.

I read your weblog entry - it was enlightening :)

> But what they hey, I'll just copy this over; this is all in 
> reference to code we (ChiPy people) have in an svn repository:
> http://lonelylion.com/chipy/pypi/

I should have given you lot access to the CVS repo. Sorry about that 
oversight.

> I started moving things to ZPT templates, Brian Ray started
> documenting the database and building some tools around it (I'm not 100%
> clear there),

Sounds interesting.

> and several people have added an xmlrpc interface to build 
> a command-line client, which is what the rest of Brant's email involves...
> > I had some ideas for the PyPI client package... Here's the basic API
> > layout idea.  Just brainstorming, really.  Everything would sit in the
> > pypi module, or perhaps pypi.client:
> [snip]

I guess this is what I'll be looking at as part of the sprint. I've still got 
a fair amount of reviewing to do of messages to this SIG though. Hopefully 
I'll find some time on Thursday, otherwise I'll be doing it during the 
(Continue reading)

bray | 15 Mar 15:59 2005

Re: PyPI WSGI frontend


> I believe it is as long as the sqlite build is threadsafe. One thing I
> will 
> try to achieve during the pre-PyCon sprinting is migrating to PostgreSQL 
> (since the psql database is already set up and waiting).
> 

I started taking a look at converting to postgresql, although I did not
commit anything. During the ChiPy spring a seperated the sql.  This
should run fine on postgres, although I did not test.  Are you thinking
of using psycopg or something else?
Ed Summers | 15 Mar 16:39 2005
Picon

Re: Re: [chiPy] pypi

On Tue, Mar 15, 2005 at 07:37:37PM +1100, Richard Jones wrote:
> I guess this is what I'll be looking at as part of the sprint. I've still got 
> a fair amount of reviewing to do of messages to this SIG though. Hopefully 
> I'll find some time on Thursday, otherwise I'll be doing it during the 
> Sprint :(

I take it the sprint is scheduled for PyCon? Any chance those who can't
make it could participate in irc?

Re: a convo we were having over on chipy which we've moved onto
catalog-sig: I integrated the stuff from xmlrpc.py and moved into 
rpc.py, and adjusted the pypi cmd line utility appropriately...and then
removed the unused stuff :)

//Ed
Chris McAvoy | 15 Mar 17:40 2005
Picon

Re: Re: [chiPy] pypi

> I take it the sprint is scheduled for PyCon? Any chance those who can't
> make it could participate in irc?

I'd be interested in this too.

Chris
Richard Jones | 17 Mar 02:48 2005
Picon

Re: Re: [chiPy] pypi


On Wed, 16 Mar 2005 02:39 am, Ed Summers wrote:
> On Tue, Mar 15, 2005 at 07:37:37PM +1100, Richard Jones wrote:
> > I guess this is what I'll be looking at as part of the sprint. I've still
> > got a fair amount of reviewing to do of messages to this SIG though.
> > Hopefully I'll find some time on Thursday, otherwise I'll be doing it
> > during the Sprint :(
>
> I take it the sprint is scheduled for PyCon? Any chance those who can't
> make it could participate in irc?

Sure, if I can get organised enough to get the IRC going :)

> Re: a convo we were having over on chipy which we've moved onto
> catalog-sig: I integrated the stuff from xmlrpc.py and moved into
> rpc.py, and adjusted the pypi cmd line utility appropriately...and then
> removed the unused stuff :)

Cool. Is this going into that svn repository?

    Richard
Richard Jones | 17 Mar 02:50 2005
Picon

Re: PyPI WSGI frontend


On Wed, 16 Mar 2005 01:59 am, bray <at> sent.com wrote:
> I started taking a look at converting to postgresql, although I did not
> commit anything. During the ChiPy spring a seperated the sql. This  
> should run fine on postgres, although I did not test.

Is this checked into that svn repository?

> Are you thinking of using psycopg or something else?

I'm familiar with psycopg and it's installed on creosote, so I'd say that's 
the winner :)

     Richard
Ed Summers | 17 Mar 03:02 2005
Picon

Re: Re: [chiPy] pypi

On Thu, Mar 17, 2005 at 12:48:48PM +1100, Richard Jones wrote:
> Cool. Is this going into that svn repository?

Yeah, you can see our experiments here:

    svn co http://www.lonelylion.com/chipy/pypi

//Ed

Gmane