mirroring files and data via http
Matt Nordhoff
mnordhoff at mattnordhoff.com
Sun Jul 6 21:19:58 EDT 2008
Steve Potter wrote:
> I'm working on a project to create a central administration interface
> for several websites located on different physical servers.
>
> You can think of the websites as a blog type application. My
> administration application will be used to create new blog posts with
> associated media (images, etc..)
>
> So I am thinking to setting up a script on each of the sites to "phone
> home" once per day and download any new posts and media files.
>
> I am thinking of transmitting the post data in an xml format that
> could then be decoded an recorded into the database on the slave
> site. Are there any easy ways to encode a python dictionary to and
> from xml?
>
> For the media files I am thinking that the administration interface
> would also provide an xml file with a list of all of the media files
> required along with an http path to retrieve them and a checksum of
> some sort to verify that they were downloaded correctly.
>
> Basically I am trying to figure out if anything already exists to
> perform some of these functions or if I have to make them from
> scratch. I know none of it should be too hard, but I hate to re-
> invent the wheel.
>
> Thanks,
>
> Steven Potter
It sounds like JSON would be perfect for this. For working with it in
Python, the simplejson module is popular:
<http://pypi.python.org/pypi/simplejson>
--
More information about the Python-list
mailing list