Free RDMBS With Python Client & Gui Tools For Ubuntu - python

Can any of you recommend a free database engine with a Python client & gui tools (to run queries etc) that is working well with Ubuntu?
I would simply go to MySQL, but from what I know, it's Python client is not being maintained (I am searching for a database engine that has a good, working Python client)

Personally I'd go with PostgreSQL, but oursql.

Related

Questions about PostgreSQL version 12.2 and its compatibility with other operating systems

I will develop a commercial Python software with the PostgreSQL database, I will use PostgreSQL version 12.2. My first question is, to run the application database (will it be a desktop application) will I need to install something related to the database on the user's computer?
And my other question is, will I be able to run my application with this version of the database on another operating system?
I saw that on the download page of version 12.2 the database only has an installer for Mac OS X and Win 64bits, will my application be compatible with other operating systems besides those two I mentioned?
I'm new to programming, thanks in advance for the clarification. <3
The database API driver/provider (in the case of Python probably psycopg2) will have to be installed on the machine where the code runs that directly accesses the database.
In the case of a 2-tier architecture (the application is installed on the end-user machine and directly accesses the database) that driver will be installed on the end-user machine, where the Python program runs.
In the case of a 3-tier architecture (the end-user machine talks to a web server via HTTP, and the Python program that accesses the database runs in an application server on the web server machine) the driver will be installed on the application server.
There are modern architectures that are even more complicated (keyword "microservices") which few people understand well enough to use properly, but let's ignore them here for simplicity's sake. The same principle applies: whoever talks to the database directly will need to have the database driver installed.
If you install psycopg2, you will also need to install the PostgreSQL client shared library libpq on the same machine, because psycopg2 is linked with it and uses it.

Migrate Python Tornado application to Azure

Right now I'm having a Python application developed on Tornado framework.
I need to migrate it to Azure. The Back-end i will use is Clear-db as we have MySQL in On-premises.
Kindly suggest me how to migrate and host the Application on Azure.
Thanks,
Simplest way to migrate is to use Azure Web Apps. It supports different Python versions, WebSockets, etc, and you should be able to migrate almost (or at all) without changes. Take a look at that tutorial.
The second way would be to use Virtual Machines which is similar to the local server in terms of setting the needed software.

using mysql instead of sqlite3

im working on python application that requiring database connections..I had developed my application with sqlite3 but it start showing the error(the database is locked).. so I decided to use MySQL database instead.. and it is pretty good with no error..
the only one problem is that I need to ask every user using my application to install MySQL server on his pc (appserv for example) ..
so can I make mysql to be like sqlite3 apart of python lib. so I can produce a python script can be converted into exe file by the tool pyInstaller.exe and no need to install mysql server by users???
update:
after reviewing the code I found opened connection not closed correctly and work fine with sqllite3 ..thank you every body
It depends (more "depends" in the answer).
If you need to share the data between the users of your application - you need a mysql database server somewhere setup, your application would need to have an access to it. And, the performance can really depend on the network - depends on how heavily would the application use the database. The application itself would only need to know how to "speak" with the database server - python mysql driver, like MySQLdb or pymysql.
If you don't need to share the data between users - then sqlite may be an option. Or may be not - depends on what do you want to store there, what for and what do you need to do with the data.
So, more questions than answers, probably it was more suitable for a comment. At least, think about what I've said.
Also see:
https://stackoverflow.com/questions/1009438/which-database-should-i-use-for-my-desktop-application
Python Desktop Application Database
Python Framework for Desktop Database Application
Hope that helps.
If your application is a stand-alone system such that each user maintains their own private database then you have no alternative to install MySQL on each system that is running the application. You cannot bundle MySQL into your application such that it does not require a separate installation.
There is an embedded version of MySQL that you can build into your application (thanks, Carsten, in the comments, for pointing this out). More information is here: http://mysql-python.blogspot.com/. It may take some effort to get this working (on Windows you apparently need to build it from source code) and will take some more work to get it packaged up when you generate your executable, but this might be a MySQL solution for you.
I've just finished updating a web application using SQLite which had begun reporting Database is locked errors as the usage scaled up. By rewriting the database code with care I was able to produce a system that can handle moderate to heavy usage (in the context of a 15 person company) reliably still using SQLite -- you have to be careful to keep your connections around for the minimum time necessary and always call .close() on them. If your application is really single-user you should have no problem supporting it using SQLite -- and that's doubly true if it's single-threaded.

What Python/IronPython web development framework work on the Microsoft technology stack?

I started learning Python using the IronPython implementation. I'd like to do some web development now. I'm looking for a python web development framework that works on the Microsoft technology stack (IIS + MS SQL Server). Django looks like an interesting framework but based on what I have read, getting it to work on the Microsoft technology stack seems very hard or not possible.
I want to lean a web framework that leverages python strengths, so ASP.NET is not an option here.
The reasons why I want to do Python on full Microsoft stack are:
We are a .Net shop and our production servers run the full Microsoft stack
With IronPython, I'll be able to interop with our product's existing .Net Libraries
Our existing database runs in SQL Server and I want to develop an app that queries that database
Deploying my Python projects to our server will not be allowed if I have to install another web server
Any recommendations?
Working with the full MS stack will be hard as not many FLOSS frameworks aim there. You'll have better luck with a WAMP (Windows/Apache/MySQL-PostgreSQL/Python) approach.
That being said, Django works on Windows, and even can be made to work under IIS by using PyISAPIe and MS SQL Server support.
TurboGears can also be installed on Windows, and has MS SQL Server support through its ORM backends.
Trying to use -AMP under Windows can be an exercise in masochism sometimes. It can be done, but using these frameworks under Linux/BSD is much much easier and enjoyable. You should definitely try it.
While perhaps not entirely mature, isapi-wsgi looks like a promising way to run the WSGI intermediate layer on IIS (I have no hands-on experience with it, but seems worth a try!). Once you have WSGI running just about any Python web framework, including Django, should run on top of it (my personal favorite is werkzeug, a non-framework of utilities on top of WSGI, but I realize it's probably a lower level of abstraction than most web developers prefer for typical web apps and websited).
django-mssql should let Django run fine on SQL Server and looks reasonably mature (again, no hands-on experience). If you prefer a more sophisticated obj-relational mapper, SQLalchemy claims to support MS-SQL "out of the box" with minor restrictions (e.g., no more than one IDENTITY column per table).
If you want to stick with IronPython, but can live with using SQLite instead of MS-Server, it should also be possible to use Django on IronPython with IIS.
Django does in theory run on Windows, but using Apache and MySQL. It's not possible (and certainly not recommended) to run it on IIS.
I know you totally didn't ask this, but I have to advise that if you really want to get into Python web development then looking into a Linux technology stack is definitely the recommended approach. :)

Communication between Windows Client and Linux Server

I want to provide my colleagues with an interface (using Windows Forms or WPF) to control the states of virtual machines (KVM based) on a linux host. On the command line of this server, I'm using a tool, called libvirt, which provides python bindings to access its functionality.
What whould be the best pratice to remotely access several function like libvirt or reading logfiles on the server. I thought about a REST Full Webservice generated by Python. Are there other viable options to consider?
Thanks,
Henrik
I'd develop an intranet web application, using any python web framework of choice.
That way you don't have to develop/install software on your client. They just point the browser and it works.
Because you are using a server-side tool that has Python bindings, you should give a serious look at PYRO which is a Python RPC library.
http://pyro.sourceforge.net/
To use this you would also have to use Python on the client, but that shouldn't be a problem. If you haven't start writing your client, then you could do it all in IronPython. Or, if you need to add this to an already existing client, then you could still bind in either IronPython or CPython as an embedded scripting engine.
For more on PYRO and Ironpython, see this wiki page http://www.razorvine.net/python/PyroAndIronpython
Proxmox VE is a complete solution to manage KVM (and OpenVZ) based virtual machines, including a comprehensive web console, so maybe you can get a full solution without developing anything?

Categories

Resources