Has anyone found away to call Bloomberg BQL API using Pdblp or another package with Python? - bloomberg

The BQL works in Excel using what appears to be the same API add-in using the same fields to call the Bloomberg data, i.e PX_LAST. I currently run models in python using pdblp, that works great and I would love to move to the BQL version of the API to optimize data usage outside of the terminal. Is anyone aware of any effort to utilize the BQL in any package? I know someone asked about this last year... looking for an update.

Quite old but maybe someone comes along this thread...
I talked to BBG recently and they have no intention to open the BQL API for Python. They couldn't give me a reason why, when I asked but I guess they want to promote their internal BQNT environment.

I use:
"from xbbg import blp"
This seems to work pretty well.
The syntax is very similar to what one would use in excel e.g.
df = blp.bdh(tickers1, flds=fields,
start_date='2017-01-01', end_date='2023-01-25')
There is also:
"import blpapi"
But I find that less user friendly. You have to initate sessions etc.

Related

Attatching a Python Console to a PyQt app

Apologies if the answer to this question is already all over the internet, I just couldn't find an answer which was sufficiently dumbed-down for me to make use of it.
I'm making an app in PyQt for scientific computation purposes and I thought it would be nice to give the user that extra level of control and transparency into the workings of the app by attaching a python interpreter to the app.
The idea is that the interpreter should be able to access all variables that the app is also running on. In other words, I want to be able to start my PyQt app, and immediately write in the console 'print(someVariableKnownToTheApp)' and view the output as if written in the debugger in pycharm.
Doing a bit of searching online, I came across the classes 'InteractiveInterpreter' and 'InteractiveConsole' in the 'code' package, but I'm not sure how I would use these for my purpose.
Any help or suggestions would be highly appreciated.

Is anyone using or working on the Skeleton Framework?

I'm wondering if anyone is working on or using the Skeleton Framework (http://www.getskeleton.com) any more? The GitHub site does show a little activity from time to time but I'm wondering if there is a way for me to chat with people that know what's going on with it.
I've been using the framework at work one all of my recent projects and I want to get a little more involved with it's development.
Thanks
I'm currently using it to build my portfolio site. Haven't seen any recent changes to it but it does seem to be getting used quite a bit from what I've researched. I enjoy how it's bare bones, simple to use and ready to go with your own custom code. You have something you need help with?

Pastie with API and language detection

I'm trying to find a pastie like webservice that do perform some kind of automatic language detection (in term of programming language) and does the syntax coloring accordingly.
Most pastie websites do not have this feature I'd really love to have and use.
Thanks !
Pygments has something close : http://pygments.org/docs/quickstart/#lexer-and-formatter-lookup
>>> from pygments.lexers import guess_lexer, guess_lexer_for_filename
>>> guess_lexer('#!/usr/bin/python\nprint "Hello World!"')
<pygments.lexers.PythonLexer>
Not perfect but quite useful already.
But yeah I share your frustration with paste service, had the same. In my opinion actually the coloration should be done client side.
https://github.com/alexgorbatchev/SyntaxHighlighter
http://code.google.com/p/google-code-prettify/
are pretty nice in that regard.
I've finished to develop my own tool to do that. It's called UU and performs automatic syntax recognition using highlight.js.
http://uu.zoy.org is free and encode locally what you paste in your browser before sending it to the server.
The API is WIP.

Building SAP modules using PowerBuilder

Anybody aware of SAP module(s) being built using PowerBuilder or any road-map in place for such development in future.
There are some modules built in PowerBuilder. As we become more familiar with our SAP side of the business, we are hopeful to learn about more. We've met with the teams that build these modules and are understanding their roadmap and we've discussed the PowerBuilder roadmap with them as well.
Are you using PB to customize SAP? I'd be interested in discussing more of what prompted your question - please email me! I am out of the office today and tomorrow but will be back next week.
Sue Dunnell
PowerBuilder Product Manager
dunnell#sybase.com
If I'm understanding correctly you are wanting to call existing BAPI's via PowerBuilder; for example create a Purchase Requisition using the built in BAPI CreaeFromData ? I have created a couple back in version 8 or 9 of PB and it was quite a challenge it is totally do-able. I have code for creating Purchase Requisitions and have code which calls a custom "in-house" written BAPI.
I actually thought about building an API for all the SAP BAPI's because of how difficult it was and I can usually find the answer to anything on the web, but not this; had to trial and error it.
Two hints. Study the BAPI in SAP Object Explorer or maybe it was called BAPI Browser can't remember, but SAP shows the parameters in different order depending on which way you look at them. To make them work in PB you have to call the parms in the exact order, unlike the Microsoft languages where you can do named arguments and such. Then you have to be sure to make all REF types REF. Any ONE item wrong and you get the dreaded system crash which tells you nothing. If PowerBuilder had not started losing popularity I would have kept writing APIs for various BAPIs
Contact me if you want any sample code. I can't give any exact code from one of my corporate clients but would be happy to get you going in the right direction.
Sincerely,
R

Working with Excel files in web app frameworks like Seaside

Ive been reading about seaside and like the sound of it but i cant see an easy way for handling data files, primarily importing Excel. Of course csv files would be more straight forward, but are there any ways to import the various Excel formats (xls,xlsx) without writing your own file parsing routines?
I've heard that the need to open Excel files would be a good reason to choose a windows based system like .NET, what do you guys think?
There are various Smalltalk implementation that support Seaside and that have an excellent integration into the Windows platform: Dolphin Smalltalk, VA Smalltalk, and Cincom Smalltalk. I assume that it is possible to call Excel with any of these.
There are various command line tools available that you could call to convert an XLS file to something you can easily parse (like CSV).
However, I think the most elegant solution (also from an end-user perspective) is the one of Magic/Replace.
Just an answer on the second part of your question: no that is not a good reason. You definitely do not want to run Office as a server proces (I never tried with OpenOffice, but that should work somewhat better).
It is not stable and there are license issues you have to be aware of.
I've worked on a Seaside app that read and wrote excel sheets on Linux. Here's what I did …
First, I had OpenOffice run in the background and converted all office files to OpenDocument format,
and then I imported that into Squeak using some code by Takashi Yamamiya. A word of warning: by the time when I used it, excel import and export didn't work at all, it took me an afternoon and a bit of hacking to get that running, but then it went fine (Niko, why didn't you push the changes back online? Well, you see … ehh, I forgot. And now they're somewhere well hidden on my disk and I don't feel like searching.)
And that's it. It wasn't even slow, just make sure that OOo is running constantly in the background.