Python Internet Database

Chris Angelico rosuav at gmail.com
Fri May 9 17:06:34 EDT 2014


On Sat, May 10, 2014 at 6:45 AM,  <junnia at gmail.com> wrote:
> To keep with my work, I need an Internet Data Base from where a person writing a program in Python could fetch libraries, applications, compilers, etc. One of the things I need to measure is how complete and easy to use is such a data base. I will give a concrete example.
>

I'm not entirely sure, but I think PyPI (the Python Package Index)
might be what you're looking for. It has all sorts of things that
aren't in the Python standard library (and, for various reasons, some
things which are).

> 1 - Internet servers. In Lisp, one has hunchentoot. In Racket, one has the Racket Web Framework. Bigloo has hiphop.
>

Python has some of this built in; not sure what you mean by "internet
servers", but you can easily write some of the more common services in
Python (eg web (HTTP), mail (SMTP), etc). I don't know of a way to
conveniently write a Python DNS server, for instance, short of working
with sockets manually, but most of what people commonly use is there.

> 2 - Jit compiler for using from a web server. I mean, one has a web server running under Apache in a hosting service like Hostgator, Daddy Host or another inexpensive service. I decide to run a few applications in Racket, but the application  requires number crunching. I install the Jit Racket in the hosting service, and call it from my dynamic generated page. My programs will run almost at the speed of optimised C.
>

For number crunching, you can use the numpy library, which is highly
efficient. For general JIT compilation of actual Python code, PyPy
will do that. AFAIK there's no standard module for that, though.

> 3 - Music generation. I would like generation of musical scores and midi files.

I'm not aware of anything in particular, but a GNU LilyPond input file
is simple text, so I'd just write a program that produces a .ly file
and then run it through LilyPond to generate both score and MIDI. But
if you don't need printable score, the MIDI file itself is pretty
simple; there may be a module that will help, but even without, it's
pretty straight-forward in any language.

I don't know about your other requests, but check out PyPI and see
what you can find - and do also check the standard library, if you
haven't already. Each new version adds even more cool stuff; we've
recently gained a dedicated statistics module, for instance, and a new
asynchronous I/O structure.

ChrisA



More information about the Python-list mailing list