473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Making dynamic data available via ODBC with Python


I have a Python application server that manages several different data
sets, permits various reports to be run on them and the data to be
downloaded as tab-delimetered files, all via a web interface.

I'd like to explore the possibilities of making the data directly
available in Windows applications (such as Excel, where it would very
nice to directly do pivot tables from the live data) via ODBC.

So I basically need for my Python server (deployed on UNIX) to act as
a remotely queriable database. This is live and changing data, so I'd
prefer not to have to dump it into a real database first, but I
suppose that's one solution (e.g. letting PostgreSQL get the query,
run some trigger that asks my server to update the table with data and
then return the data).

Knowing little about the various available ODBC modules, one solution
seems to be to take a client/server protocol of an existing database
(such as PostgreSQL) and implement a Python server for it: so my
Python program acts like a server you could run the psql client up
against and so also get data via ODBC using the PG ODBC drivers. It
seems a bit complex because all I want to allow is to select a table
with a certain name, allow a query of what columns are available and
what type they are and to fetch the data, perhaps with minimal support
for filtering queries.

I've seen at least one program that emulates the PG client/server API
-- I think it stored some configuration data, so it acted like a
ordinary PG server you could run queries against but wasn't really
one. Its name completely escapes me at the moment though.

Is there some better way of doing this -- some way to provide tabular
data remotely to Windows machines, usable in Office programs, which
happens to already have some Python code written for it? Looking
around, there is at least one XML-to-ODBC bridge but encoding the
entire data file as XML is likely to have prohibitive overhead.

--
================================================== =============
<er**********@andreasen.org> Herlev, Denmark
<URL:http://www.andreasen.org/> <*>
================================================== =============

Jul 18 '05 #1
1 1630
>
Is there some better way of doing this -- some way to provide tabular
data remotely to Windows machines, usable in Office programs, which
happens to already have some Python code written for it? Looking
around, there is at least one XML-to-ODBC bridge but encoding the
entire data file as XML is likely to have prohibitive overhead.


I still think that this is the most viable solution - if performance is bad,
you could still explore other possibilities.

If it actually is performing bad - either literally or due to a badly
design - I'd go for creating a odbc2your-server driver. That would allow
you to cope with a pretty well defined standard (odbc) and doing the
network stuff totally on your own behalf instead of trying to make some
self-written protocol stack like postgres so compatible that a postgres
odbc driver doesn't know the difference.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
5
by: Mike | last post by:
I am writing a .NET application in C# that uses Crystal Reports. I want the crystal reports to grab information from a database no matter where the database is located. To do this, I want to...
0
by: Andy Lee | last post by:
System.Data.Odbc namespace is only available in .NET framework 1.1 while Microsoft.Data.Odbc is available in .NET framework 1.0. I heard that the System.Data.Odbc is exact the same as...
5
by: dananrg | last post by:
I was messing around with the native ODBC module (I am using Python in a Win32 environment), e.g: import dbi, odbc ....and it seems to meet my needs. I'd rather use a module that comes...
2
by: Carl K | last post by:
A friend needs to convert c-tree plus data to MySql. I can to the "to MySql part, but need some help with the "from c-tree." If I just wanted to get this done, I would hunt down the ODBC driver...
3
by: Harmony504 | last post by:
HELP! Setup: PHP5.2.5, IIS 5.1, XP, AS/400 (DB/400 or DB2) I am trying to connect to a DB2 database from my computer. I installed DB2 Connect and set up the ODBC Driver in the Data Source...
11
by: Rafe | last post by:
Hi, I'm working within an application (making a lot of wrappers), but the application is not case sensitive. For example, Typing obj.name, obj.Name, or even object.naMe is all fine (as far as...
5
by: bearophileHUGS | last post by:
I often use Python to write small programs, in the range of 50-500 lines of code. For example to process some bioinformatics data, perform some data munging, to apply a randomized optimization...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.