[request] code snippet to retrieve files/data from local database
See original GitHub issueHi,
First, thanks a lot for open-sourcing the code and database which I highly appreciate it.
I have recently installed the database locally for faster query of the entries. However, I’ve had a bit of difficulty in retriveing structures from the database, and thought to ask here if it is possible to share a code snippet which would help solving my issue.
As an example, I would like to know if I follow the tutorial for getting the entries based on the composition as:
elts = [ 'Fe', 'Li', 'O' ]
others = Element.objects.exclude(symbol__in=elts)
comps = Composition.objects.exclude(element_set=others)
How can I iterate over the composition and retrive the structures associated with each entry?
Best regards, Pezhman
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Fetching data from the server - Learn web development | MDN
This article shows how to start working with Fetch to fetch data from the server.
Read more >How To Use the JavaScript Fetch API to Get Data - DigitalOcean
In this tutorial, you will create both GET and POST requests using the Fetch API.
Read more >How to Pull Data from an API using Python Requests
Goes in the URL: Take the URL that outputs from the code snippet and paste it into your browser.
Read more >How to Fetch Data using API and SQL databases!
Hands-on Code to Fetch data from API. Open your Jupyter Notebook to write the code and extract the data in the dataframe. Install...
Read more >Python basics - request data from API and write to a file
retrieve data into a variable; write this into a file (later, as I get more familiar with Python, into my local MySQL database)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks a lot @tachyontraveler, much appreciated. Best regards, Pezhman
@pzarabadip Did you figure out how to extract the necessary info to reconstruct the structure files from the SQL DB? Could you please post your solution here?