I have a question regarding Python/cx-Oracle.
The Oracle SQLcl and SQL*Developer tools, both support proxy server connections (not to be confused with proxy users).
For example, on SQLcl their is a command line option, "--proxy", which is nothing to do with proxy users.
I can't say that I know exactly how they work, but the options are there, and I assume that there is an option in an API in there to support it.
Is this something which cx-Oracle supports?
Thanks,
Clive
I tried looking at the cx-Oracle docs, but couldn't spot anything which might help.
I had another through the docs and it appears that you are expected to make changes to oracle config files (sqlnet.ora and testament.ora). That said, it also appears that newer EZconnect string syntax supports the proxy server requirement.
Related
I'm using Debian 8 alongside Plesk Onyx (latest version). Now I want to install Seafile, which is dependent also from Python. I found tutorials on the Internet, however, none which describes how to set this up under Plesk within a subscription. So I neither want the port to be 8080, nor a 'separate' web server by Seafile itself. I want to access my seafile then under https://cloud.mydomain.com, is there any way to do this? And if there's no definite guide, what would be the rough steps (with regard to Seafile's program architecture and how it works)?
Not sure if still relevant, but anyway: Yes, it is definitely possible. Seafile installation should proceed according to normal installation process described in Seafile's Manual.
Redirecting the traffic from the frontend servers to Seafile/Seahub is a trickier, a more detailed description, using FastCGI, can be found here:
https://andre-hoeche.de/blog/2016/07/install-seafile-5-1-on-debian-7-10-with-apache-2-2-and-plesk-10-5/
Task: add Kerberos active directory authentication to an insecure reporting and data manipulation desktop application. This app is...
written in Stackless Python 2.7
uses Twisted for client-server interactions
Client is compiled to an exe and runs on Windows
Servers run on Linux (Red Hat)
Currently we pull the Windows network ID (logon name) from the user's account and pass to the server, which looks up what permissions that user is configured to have, and passes back menu options which provide access just to those features. Main weakness is that one could send a different username to the server and access other permissions.
Therefore Kerberos. (And LDAP, from what I read.)
Question:
Does Twisted provide a built-in Kerberos setup?
authkerb perhaps?
I found authkerb after a ton of searching, but I don't see feedback from anyone using it. I'm not sure where to start. If anyone has experience with this, or if you've run across any relevant info to implementing Kerberos specifically with Twisted, I'd appreciate it immensely!
I've never touched anything like Kerberos before, so I read up on it:
kerberos.org/software/tutorial.html
technet.microsoft.com/library/cc961976
web.mit.edu/kerberos/krb5-latest/doc/appdev/init_creds.html
web.mit.edu/kerberos/krb5-1.12/doc/user/tkt_mgmt.html
Also found tips on what to avoid:
faqs.org/faqs/kerberos-faq/general/section-83.html
Twisted does not.
However, http://calendarserver.org, which is bassed on Twisted, does have kerberos authentication, and was the originator of the https://pypi.python.org/pypi/pykerberos project. It should serve as a workable example.
I am attempting to follow set up the python xmpp server for GCM as detailed here:
https://developer.android.com/google/gcm/ccs.html
The website I used for hosting is pythonanywhere.com
My issue is that when I saw import xmpp, it says that no such module is found.
Should I be trying to install it on their server? I realize that this issue is probably really basic, but I have looked online for the last hour or so without much fruit. I see all these variations on XMPP and am not sure if I have to deal with any of those or if I can just do exactly what the google demo is saying.
Thanks for your time,
-Alper
PythonAnywhere doesn't support raw TCP socket connections or websockets, so XMPP may not work. But then again, from reading wikipedia, it does look like there's a pure-HTTP alternative, so it might work.
Check out this guide to installing new modules: https://www.pythonanywhere.com/wiki/InstallingNewModules. My suggestion would be to use a virtualenv for your web app, and install flask and xmpp into that...
You will have to download and install the missing python package. You may do this manually via SSH if the provider gives you access, or there may be a way to include a requirements document such that the server looks and downloads needed packages automatically. It all depends on the host, the access they allow you, and their automation features.
I tried to run remote command to back up my server db, after dumbing it I can't figure out how to remotely get the datas.
https://docs.python.org/2/library/subprocess.html
Found some documentation, but that didn't really helped me.
Most databases have some remote-backup service available, so I'd look into that first.
That said, you could use a library that simplifies secure-shell operations. One of those is Fabric which was based on paramiko.
Fabric was designed for things like remote backups (or deployments). You want to look specifically at it's get operation capabilities.
I advice you to read this documentation.
=> https://docs.python.org/2/library/ssl.html#socket-creation
Best regards,
Greg
I am developping a django app on Windows, SQLite and the django dev server . I have deployed it to my host server which is running Linux, Apache, FastCgi, MySQL.
Unfortunately, I have an error returned by the server on the prod while everything ok on the dev machine. I've asked my provider for a pre-production solution in order to be able to debug and understand the problem.
Anyway, what are according to you the most likely errors that can happen when moving a django app from dev to prod?
Best
Update: I think that a pre-prod is the best way to address this kind of problem. But I would like to build a check list of what must be done before to put in production.
Thanks for the very valuable answers that I received until now :)
Update: FYI, I 've implemented the preprod server and the email notification as suggested by shanyu and I can see that the error comes from the smart_if templatetag that I am using on this new version. Any trick with template tags?
Update: I think I've fixed the pb which was caused I think by the Filezilla FTP sending. I was using the "replace if newer" option which I guess is causing some unexpected results. Using the "replace all" option fix the issue. However, it was an opportunity for me to learn more about deployment. Thansk for your answers.
Problems I typically have include:
Misconfigured productions settings, whether in my production localsettings.py, wsgi/cgi, or apache site files in /etc/sites-available
Database differences. I use South for migrations and have run into some subtle issues when performing my migration on PostgreSQL when it worked smoothly in sqlite.
Static file hosting since I cheat and use the Django server in development
Permissions, both on the file system and within the database
Rare, but possible, network issues preventing me from getting my dependencies, whether on PyPi or some 3rd party site
Ways that I have mitigated these issues:
Use the same database in production and development (in your case, MySQL everywhere)
I've found it is useful to have a "test" environment which mimics production in every way possible (it can be on lower end hardware, or even the same machine). This way, if there are any issues in this "production-like" enivornment, I can solve them without taking my production server offline.
Script everything for repeatable deployments. I use fabric, but zc.buildout or Paver would also work. These tools help reduce typos while deploying and reduce the time to deploy my app.
Use version control (mercurial, git, subversion) and a schema migration tool (like South), so if something does go wrong when you deploy to production, you have the possibility of backing out the changes and allowing production to run on the old code with the old database schema.
I haven't set up an "egg proxy" yet, but I am considering it, to avoid issues when downloading dependencies.
I've found pip's freezing dependencies to be useful, in case a new, incompatible change to a library occurred since I downloaded it initially
Use a web testing framework like Windmill or Selenium to test my application in my "test" environment, so that I can get a lot of test coverage of my system very quickly.
Regarding your case, I can think of 2 simple things that may help you:
You can enable Django to send messages when exceptions occur giving details about them. Look at here for details.
You'll be better off if you set up a test environment on the prod server (say, test.example.com) so that you can check if things will go smoothly or not before you deploy the app.
I believe these were the podcasts I listened to recently (from Pycon 2009):
Locate Django in the Real World (PyCon 2009):
http://advocacy.python.org/podcasts/pycon.rss
Parts 1 to 3
Very good introduction to designing your apps for deployment, in particular for reuse and redeployment.
Regs.