Creating spreadsheets for download in django - python

I am using xlrd to create spreadsheets. On a website, a user will be able to create a custom report and download that xls file.
Usually, I am storing files on S3, but in this case, is there a way not to store the file anywhere and just give it directly to the user? Or how should I do this if I don't want to use S3 to save the file?

xlrd is a good choice. About the generation and download processes - it depends on the web framework in usage, here is an example with web2py.

Related

Is it possible to use Django to parse locally stored files (csv for example) without uploading them?

I would like to develop a WebApp that parses locally stored data and allows users to create a sorted excel file.
It would be amazing if I could somehow avoid the uploading of the files. Some users are worried because of the data, the files can get really big so I have to implement async processes and so on...
Is something like that possible?

What's the best way to handle large files upload with aiohttp (server)

I'm currently working on kind of cloud files manager. You can basically upload your files through a website. This website is connected to a python backend which will store your files and manage them using a database. It will basically put every of your files inside a folder and rename them with their hash. The database will associate the name of the file and its categories (kindof folders) with the hash so that you can retrieve the file easily.
My problem is that I would like the file upload to be really user friendly: I have a quite bad connection and when I try to download or upload a file on the internet I often get problems like at 90% of file uploading, the upload fails and I need to restart it. I'ld like to avoid that.
I'm using aiohttp to achieve this, how could I allow a file to be uploaded in multiple times? What should I use to upload large files.
In a previous code which managed really small files (less than 10MB), I was using something like that:
data = await request.post()
data['file'].file.read()
Should I continue to do it this way for large files?

How do I upload and manipulate excel file with Django?

Ok,
I had a look at the UploadFile Class documentation of the Django framework. Didn't find exactly what I am looking for?
I am creating a membership management system with Django. I need the staff to have the ability to upload excel files containing list of members (and their details) which I will then manipulate to map to the Model fields.
It's easy to do this with pandas framework for example, but I want to do it with Django if I can.
Any suggestions.
Thanks in advance
you can use xlrd to read excel files
in client side you just submit a form with file input.
on server uploaded file stored on request.FILES
read file and pass it to xlrd then process sheets and cells of each sheet

Access data in .realm file from Python

Purpose:
I want to create a web page within a django app where support staff can upload a .realm file and have the web application pull the user and figure out what information in the .realm is missing on the site.
Question:
Is there a way to open, read and/or manipulate .realm files with Python? If not, what are my options for converting it to something else like SQLite? Would I need to create some way for the support staff to convert the file before they upload it?
Is there a way to open, read and/or manipulate .realm files with python?
Realm does not currently have a Python SDK.
If not what are my options for converting it to something else like a sqlite?
To access data from a Realm file on the server side of a web application, your best bet at the present point of time would be to use Realm's Node.js SDK. Alternatively, you could use a client-side app using one of Realm's other SDKs (Objective-C, Swift, Android, .NET, etc.) to extract the data in question and covert it to a format that your web application can consume.

upload csv/excel file to appengine (python) for processing

I need to be able to upload an excel or csv file to appengine so that the server can process the rows and create objects. Can anyone provide or point me to an example of how this is done? Thanks for your help.
Uploading to the Blobstore is probably what you are after. Then reading the data and processing it with the csv module.
You might want to look into sending your file to google docs in the case of excel (and other) formats then reading the rows back via the Spreadsheets API
If you mean a one-off (or a few) transfers, you're probably looking for the bulk upload system: http://code.google.com/appengine/docs/python/tools/uploadingdata.html
If you're talking about regular uploads during use, you'll need to handle them as post requests to the application.

Categories