I am currently engaged in a project aimed at incorporating a new exchange within the CCXT library using the Python programming language. Would anyone be able to provide an explanation regarding the method by which the library performs requests to the API of the brokerage in question?
I attempted to read the documentation and understand some code from some exchanges, but without success. I would like an example of how to implement the 'fetch_order_book()' for a new exchange.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Trying to understand whether it is feasible to create a multi-platform Python package that could be able to sign objects using HSM of any vendor?
Since pkcs#11 libraries of different vendors must implement single interface, it seems to be possible if not use vendor specific API. However, OpenSC has a list of supported HSMs and a list of not supported, so I think that it is more complicated than I thought.
Please let me know whether it is possible or explain why not. Thanks.
PKCS#11 is an API standard. It describes an API for software that wants to use a smart card or other crypto 'device'. It does not describe how a vendor should do anything underneath that API. And, it does not expect you (as the software programmer) to know how to access all the hardware out there.
Your app says "C_Login" because that's PKCS#11. P11 states what C_Login expects, and what the state of the environment should be after that call is made -- it does not tell the vendor how to get to that state, only what end-state is expected, not the path how to get there.
Now: ...multi-platform Python package... Absolutely possible, assuming you had access to EVERY device binary protocol, communications protocol and programming methodology, for everything out there that provides a crypto-card interface.
Every smart-card, HSM, soft-HSM etc that supplies a P11 library knows what your application will ask for, but how it goes about making that object or state available is entirely up to the actual device/pseudo-device. This is why a vendor-specific library is needed -- because the vendor knows the vendor's devices and protocols.
Or you could provide an API standard that defines a standardized way for software to access hardware, making the binary protocol, communications protocol and programming methodology abstract... ie, you'd be recreating PKCS#11, but one specific to Python.
Faster to use the Py lib that talks PKCS#11, and connects to any of the P11 vendor-provided libraries, to talk to that vendor's equipment.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a project for University where we are developing a toy healthcare app and I am the backend developer. This app interacts with users, collecting their data. This data is used to make predictions for the user (data science) and can also be sent to doctors. Doctors can also update the data and send it back to the app.
What I do know:
The backend will be in Python, since that's the language of Data Science.
Probably will use Flask for ease of use
needs a database to store the data - probably start with SQLite also for quick ease of use
What I don't know:
since we are dealing with health data, I know that there are standards when it comes to transferring such data, such as using FHIR. But I have no idea where FHIR fits in in the app. I saw that Smart-on-FHIR has a fhirclient library with an example in Flask - is that the way to go?
I assume I need a FHIR server but how do I use one? I saw many available for testing, but how can I use those if the data needs to be private?
Basically, although I know which technologies to use, I don't know how to actually fit the pieces together. This question is asking for ideas on how to piece this project together. I need some clarity to get started and get things off the ground. I have a Flask server - how do I implement this FHIR in it so that I store the data properly, get the data for predictions and also send the data back and forth between the app and the doctor?
I appreciate any help!
FHIR is principally standard for sharing information between software systems - be that applications within a hospital, between EMRs and community pharmacies, clinical systems and research systems, etc. If your system isn't actually sharing data with other applications, there's no real need to use FHIR at all.
You could choose to use FHIR anyhow - you could download one of the FHIR open source servers and use that as your persistence layer. (You'd have your own instance running on your own hardware/cloud server, so your data would be your own.) The rationale for doing that is that it'll be good at storing healthcare data and will have most of the features you need (though it'll likely have a whole lot of features you don't). Also, if one of the objectives of your project is learning, then understanding how FHIR represents data will be useful as you move beyond a 'toy' application and start working with real systems that invariably need to share data.
SMART on FHIR is a mechanism to let you embed applications inside of electronic health record systems that have access to the EHR's data. It can also be used to create web applications that have access to EHR data. The key thing that SMART provides is an ability for a user to control what data the app has access to. (Just like you can control whether an app on your phone can access your address book or microphone, SMART lets you control whether a healthcare app can access your allergies or medications.) It's not obvious from your project description that there'd necessarily be a need for that functionality.
In short, you probably don't need FHIR, but you may find some of the open source tools developed by the FHIR community useful. Good luck with your project.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to decide which GUI framework to use to build my first Python GUI desktop app.
Important to mention that I recently started coding in Python and I do not have strong bases in C++.
For now my main focus for python is data parsing and data analytics. I plan on learning more advanced machine learning skills by end of year. The first GUI I'd like to build is for my data parsing though, it would be pretty basic with a couple buttons to popup file selection dialogs, select destination folders and load a file containing a set of parsing parameters.
Since I still consider myself a beginner, so I will pay attention to:
available documentation
active/supportive community
simplicity to get started with coding the UI
simplicity of sharing UI (although I plan on compiling to exe, so this may not be such a pb?)
For these reasons, I'm leaning towards using built in TKinter or wxPython which appears to give a neater result and which comes with many different widgets. PyQT seemed more complicated to learn to begin with
I would however really welcome a GUI designer function where I can build a simple enough UI using my mouse like in PyQT though. Does wxPython offer something similar?
I also read good things about PySide & Kivy any thoughts ?
Thanks!
I've recently come across the same issue and found another posting on here that may address what your looking for.
Displaying Pandas dataframe in tkinter
From personal experience tkinter is my preferred module for creating GUI's. There is plenty of documentation online and customizable widgets that addresses the functionality your looking for. Considering your experience in Python, I recommend this to start.
As for data parsing, I recommend using the pandas module as well. The pandas library provides several methods that are helpful when parsing files. I've used this to parse large csv files in the past.
The posting above has a link to a YouTube video playlist from "sentdx" who use tkinter to create a GUI to report bitcoin analytics. He also addresses how to convert tkinter to exe as well.
Best of Luck
You can try out Dash which is a Python-based framework which is predominantly used to create web applications that include intense data visualizations. For the purpose of data analytics and visualization this frame work could be better.
You can find out more information here.
My answer is quite specific to the Betfair API however I would like to know how to use more APIs in general. I'm quite new to this sort of thing so don't really know how it works. I've just downloaded this package: https://github.com/jmcarp/betfair.py
My question is, how am I supposed to know the functions that come associated with it? How am I supposed to be able to know how to pull the data that I want from any given website without having any resource describing the functionality of the API?
These library is only a binding (with several errors) to Betfair APIs.
You can find documentation about this API, and therefore about this library, in Developer's web.
If you're interested in how to use Betfair APIs in Python you can take a look at Betfair's code samples.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have spent quite a bit of time researching the different Python frameworks for neo4j (i.e. neo4django, bulbflow, py2neo), and have been very impressed at how they are able to abstract the functionality to make it feel like working with familiar relational databases. The question I have is around setting up a stack that allows for some of this abstraction for things like model creation, oauth, and basic querying but to incorporate graph-based algorithms for data analysis, more detailed traversals and path finding, etc.
Is there a recommended or tried approach for creating a robust RESTful API with the available libraries and capabilities of Django, and the freedom to drop down to the lower level neo4j API when necessary? Having some control over the cypher queries would be great, but I don't want to re-invent the wheel if something like neo4django has already implemented the basics very well. It is a bit daunting deciding how to set this all up from scratch, and there seem to be a lot of possibilities, so any advice is greatly appreciated.
For example, since py2neo is built on top of the neo4j REST API, and I then use it to work with Django and Tastypie as a separate REST API, which is accessed by a mobile or web app, do these layers of abstraction get redundant or even start to take away from the usefulness? Again, any input from people who have worked with graph databases and python is definitely helpful.
Thanks!
EDIT:
I would also really like to take advantage of some of the neo4j libraries out there, such as spatial, so the extra abstraction in some of the existing solutions may be counter-productive -- again, I'm not sure though!
Both Neo4django and Neomodel are built on client libraries (neo4jrestclient and py2neo respectively) so you can in theory drop down to lower level functionality with either of those projects as required.
I also built a (very basic) Object-Graph Mapping module for py2neo which is intended to be a base for custom object mapping layers. In light of some of the big enhancements in Neo4j 2.0 though, I have a number of improvements planned for this module as and when I get the time.
I was debating with myself if I should answer as the repo and the python package is outdated but I guess more information is better.
Here is a repo where Django is used with neo4j-embedded. I went this way to be able to build what ever REST API I wanted (tastypie) and use the very fast embedded db.
That said, as Neo4j approaches 2.0 I would think twice of investing to much in the embedded db and Python. Neo4j's REST server seems the way to go.