semvec/pypi-packages huggingface dataset:
psa-utils 0.4
A collection of PSA utilities
Requires Python: >=3.10
Keywords: PDS, PDS4, archive, data, PSA, ESA

# psa_utils
A python package for working with the ESA Planetary Science Archive. The following sub-modules are available:
### download
Provides functions to help with downloading public data products using either PDAP or TAP

### packager
Provides a class to package PDS4 products for delivery to the PSA

### geogen
Provides useful utilities for working with the geogen geometry generator package

### tap
A wrapper of the astropy tap class with some convenience functions and useful queries

### pdap
A minimal wrapper of the PDAP API using the requests library

### common
Common functions used across the package

### internal
Anything contained here is designed for PSA internal use.


## Dependencies

The following dependencies must be met:
- python >=3.6
- matplotlib
- numpy
- astropy
- pandas
- pyyaml
- requests

## Installation

### pip

```pip install psa_utils```

should do the job, although creating a dedicated environment is recommended (see below).

### conda

First, clone this repository. If you are using conda, the dependencies can be installed in a new environment using the provided environment file:

```conda env create -f environment.yml```

The newly created environment can be activated with:

```conda activate psa_utils```

Otherwise, please make sure the dependencies are installed with your system package manager, or a tool like `pip`. Use of a conda environment or virtualenv is recommended!

The package can then be installed with:

```python setup.py install```




## URL

The URL for the PSA can be specified when instantiating the tap class. If none is given, a default URL is used, which corresponds to the default operational server.



## Example

The Jupyter notebook included with this repository shows examples of each function and module. Click [here](https://nbviewer.jupyter.org/github/msbentley/psa_utils/blob/main/psa_utils_demo.ipynb) to access the notebook!
wagtail-neuralyzer 0.2.6
Anonymize specific django model for specific instance - support for wagtail
Requires Python: >=3.6
Keywords: django, wagtail, anonymize

# wagtail-neuralyzer

Pairs with [django-neuralyzer](https://github.com/webu/django-neuralyzer/), with wagtail support.

## Install

```
pip install wagtail-neuralyzer
```

## Register a model to have neuralyze action

Add `wagtail_neuralyzer` to your `INSTALLED_APP`:

```py
INSTALLED_APP = [
    ...
    "django_neuralyzer",
    "wagtail_neuralyzer",
    ...
]
```

### Add item action

Add the `NeuralyzeSnippetViewSetMixin` to your snippet class:

```py

from wagtail_neuralyzer.views import NeuralyzeSnippetViewSetMixin
from wagtail_neuralyzer.views import NeuralyzeView

from my_app.neuralyzers import PersonNeuralyzer

# Create a new view that handle url and action as well as neuralyzer class
class OperatorNeuralyzeView(NeuralyzeView):
    neuralyzer_class = OperatorNeuralyzer


# inherit NeuralyzeSnippetViewSetMixin to register new url and neuralyze view
class PersonSnippetViewSet(NeuralyzeSnippetViewSetMixin, SnippetViewSet):
    model = Person
    neuralyze_view_class = OperatorNeuralyzeView
    ...
```

and finally register the new action:

```py
from wagtail import hooks
from wagtail_neuralyzer.menu_item import NeuralyzeMenuItem

@hooks.register("register_snippet_action_menu_item")
def register_anonymize_menu_item(model):
    if model == Person:
        return NeuralyzeMenuItem()
```

And _Tada_, your model should have an "Anonymize" action together with save/delete/publish/...

### Add bulk action

You can also add bulk action to the index view by registering wagtail hook

```py
from wagtail import hooks

from wagtail_neuralyzer.action import NeuralyzeBulkAction

from my_app.models import Person
from my_app.neuralyzers import StudentNeuralyzer

@hooks.register("register_bulk_action")
class PersonNeuralyzerBulkAction(NeuralyzeBulkAction):
    models = [Person] # specify model here
    neuralyzer_class = PersonNeuralyzer # and neuralyzer to use here
```