semvec/pypi-packages huggingface dataset:
drf-spreadsheets 1.1.3
A Django REST Framework package allowing views to be rendered as CSV or XLSX
Requires Python: >=3.6

# Django REST Spreadsheets renderer

This project pulls work from [drf-renderer-xlsx](https://github.com/wharton/drf-renderer-xlsx) and 
[django-rest-framework-csv](https://github.com/mjumbewu/django-rest-framework-csv) aiming to combine these renderers
into a single package while fixing some of their individual quirks.

## Differences
An important use case for file export in a RESTful API is to allow the user to manipulate data using their own tools. 
While pagination is useful for endpoints where you don't need to see all the data, they don't make sense for these types
of file export. This project will handle pagination by ignoring it, serializing the entire queryset.

---

In addition, to enable CSV/XLSX on an endpoint, all that needs to be done is adding a single mixin like such:

```lang=py
from drf_spreadsheets.mixins import SpreadsheetMixIn

class YourViewSet(SpreadsheetMixIn, ModelViewSet):
    ...

```

This instead of manually overriding `renderer_classes`, or adding the renderer to the defaults. The former is clunky and 
can lead to unwanted behavior, and the latter is rarely necessary since there will be many endpoints that don't need
spreadsheet exports in most projects.

---

One regression is in XLSX styling. For the initial version of this package, no styling can be applied to generated 
XLSX files. Since this is not an essential feature for most export use-cases, it has been left as a potential future feature

## Usage

To use this package, simply add the `SpreadsheetMixIn` to a ViewSet! By default, both CSV and XLSX formats will be 
available on that view. There are six fields provided by `SpreadsheetMixIn`:
 
 |field|default|use|
 |-----|-------|---|
 |enable_csv|True|Allows CSV format to be accessed on that particular ViewSet|
 |enable_xlsx|True|Allows XLSX format to be accessed on that particular ViewSet|
 |enable_spreadsheets_on_details|False|Allows the CSV and/or XLSX renderers to be used on detail views (ie not list views)|
 |enable_renderer_defaults|True|Allows the default renderers found in api_settings to also be used. If set to false, exclusively the spreadsheet renderers will be used|
 |filename|None|Overrides the auto-generated filename of the form "\<Model name> Report" or "\<View name> Report" if no model is available|
 |spreadsheet_headers|None|Overrides the auto-generated columns with either a list or a dictionary. If it is set to be a dictionary, the keys will be columns to include and the values will be their names/labels.|
 |compact_columns|False|Renders secondary data structures as json strings instead of creating new columns for their children|
 
An alternative to providing `spreadsheet_headers` as a field through `SpreadsheetMixIn` is providing it via overriding
the `get_renderer_context()` method. For example

```lang=py
    def get_renderer_context(self):
        context = super(MyViewSet, self).get_renderer_context()
        if 'headers' in self.request.GET:
            context["spreadsheet_headers"] = self.request.GET['headers'].split(',')
        return context
```
tri-again 0.1.4
Simple scenegraph for quickly debugging 3D meshes, polylines, and points
Requires Python: >=3.6, <3.9

# tri-again

[![version](https://img.shields.io/pypi/v/tri-again?style=flat-square)][pypi]
[![python versions](https://img.shields.io/pypi/pyversions/tri-again?style=flat-square)][pypi]
[![license](https://img.shields.io/pypi/l/tri-again?style=flat-square)][pypi]
[![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?style=flat-square)][coverage]
[![build](https://img.shields.io/circleci/project/github/lace/tri-again/master?style=flat-square)][build]
[![code style](https://img.shields.io/badge/code%20style-black-black?style=flat-square)][black]

Simple scenegraph for quickly debugging 3D meshes, polylines, and points.

[pypi]: https://pypi.org/project/tri-again/
[coverage]: https://github.com/lace/tri-again/blob/master/.coveragerc#L2
[build]: https://circleci.com/gh/lace/tri-again/tree/master
[docs build]: https://tri-again.readthedocs.io/en/latest/
[black]: https://black.readthedocs.io/en/stable/

## Contribute

- Issue Tracker: https://github.com/lace/tri-again/issues
- Source Code: https://github.com/lace/tri-again

Pull requests welcome!


## Support

If you are having issues, please let us know.


## License

The project is licensed under the MIT license.
hobart-svg 0.4.1
Render polygons, polylines, and mesh cross sections to SVG
Requires Python: >=3.6, <3.9

# hobart-svg

[![version](https://img.shields.io/pypi/v/hobart-svg?style=flat-square)][pypi]
[![license](https://img.shields.io/pypi/l/hobart-svg?style=flat-square)][pypi]
[![build](https://img.shields.io/circleci/project/github/lace/hobart-svg/master?style=flat-square)][build]
[![docs build](https://img.shields.io/readthedocs/hobart-svg?style=flat-square)][docs build]
[![code style](https://img.shields.io/badge/code%20style-black-black?style=flat-square)][black]

Render polygons, polylines, and mesh cross sections to SVG.

[pypi]: https://pypi.org/project/hobart-svg/
[black]: https://black.readthedocs.io/en/stable/
[build]: https://circleci.com/gh/lace/hobart-svg/tree/master
[docs build]: https://hobart-svg.readthedocs.io/en/latest/


Features
--------

- Render 2D and 3D polygons and polylines to SVG, with automatic computation
  of the bounding rectangle.
- Render cross sections of [lacecore][]-style polygonal meshes.
<!--
- Complete documentation: https://hobart-svg.readthedocs.io/en/stable/
-->

[lacecore]: https://github.com/lace/lacecore


Installation
------------

```sh
pip install hobart-svg
```

Usage
-----

```sh
python -m hobart_svg.cli horizontal-xs \
    --reference vitra_with_xs.dae \
    examples/vitra/vitra_without_materials.obj \
    15 30 45 60
```

```py
from hobart_svg import render_longest_xsection_to_svg
import lacecore
import numpy as np
from polliwog import Plane
import vg

mesh = lacecore.load_obj(filename="mesh.obj", triangulate=True)

plane = Plane(
    point_on_plane=np.array([0.0, 30.0, 0.0]),
    unit_normal=vg.basis.y)

render_longest_xsection_to_svg(
    mesh=mesh,
    plane=plane,
    filename="cross_section.svg")
```

```py
from hobart_svg import render_longest_xsection_to_svg
import lacecore
from polliwog import Plane
from tri_again import Scene

mesh = lacecore.load_obj(
    filename="examples/vitra/vitra_without_materials.obj",
    triangulate=True
)
plane = Plane(
    point_on_plane=np.array([-0.869231, 60.8882, -20.1071]),
    unit_normal=vg.normalize(np.array([0., 0.1, -1.])))
xs = render_longest_xsection_to_svg(
    mesh=mesh,
    plane=plane,
    filename="vitra_cross_section.svg")

Scene().add_meshes(mesh).add_lines(xs).write("vitra_with_cross_section.dae")
```


Contribute
----------

- Issue Tracker: https://github.com/lace/hobart-svg/issues
- Source Code: https://github.com/lace/hobart-svg

Pull requests welcome!


Support
-------

If you are having issues, please let us know.


License
-------

The project is licensed under the two-clause BSD license.