Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Create Excel files from CSVs using the GoodGrids API, based on an example Excel file template.
Django API for creating Excel files from CSV using the web-based GoodGrids API.
GoodGrids is a service for creating Excel files from CSV files programmatically. You upload an example Excel file to serve as a template. You can then use the GoodGrids API to create Excel files from CSV files based on this template. You can style cells, include formulas, and avoid all the issues that plague CSV files.
Let's assume your Django application already has a class-based view DownloadDataCSVView
that returns a CSV file for your users to download. To create a view that let's your users download Excel files, use the following snippet:
from django_goodgrids.views import DownloadDataAsExcelView
class DownloadDataAsExcelView(GoodGridsExcelExportViewMixin, DownloadDataCSVView):
goodgrids_api_url = 'https://goodgrids.com/create-excel-file/3a6c0d9ac7c74d'
excel_file_name = 'data.xlsx'
Make sure to set goodgrids_api_url
to your actual API URL.
You can then include this in your urls.py
:
url(r'^download-data-as-excel-file/?$',
views.DownloadDataAsExcelView.as_view(),
name='download_data_as_excel_file'),
Let's assume your Django application already has a function-based view named download_data_as_csv_view
that returns a CSV file for your users to download. To create a view that let's your users download Excel files, use the following snippet:
from django_goodgrids.views import create_goodgrids_excel_export_view
download_data_as_excel_view = create_goodgrids_excel_export_view(
csv_export_view=download_data_as_csv_view,
goodgrids_api_url='https://goodgrids.com/create-excel-file/3a6c0d9ac7c74d',
excel_file_name='data.xlsx',
)
Make sure to set goodgrids_api_url
to your actual API URL.
You can then include this in your urls.py
:
url(r'^download-data-as-excel-file/?$',
views.download_data_as_excel_view,
name='download_data_as_excel_file'),
FAQs
Create Excel files from CSVs using the GoodGrids API, based on an example Excel file template.
We found that django-goodgrids demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.