semvec/pypi-packages huggingface dataset:
ugrc-swapper 1.2.4
Move data from one SDE database to another with minimal downtime
License: MIT
Keywords: gis

# swapper

## This tool will

1. Take a sgid-internal feature class name (ie SGID.OWNER.FeatureClass) as input.
1. Parse the name to get the corresponding connection files in L:\sgid_to_agol\ConnectionFilesSGID
1. Check if the input sgid-internal connection file exists
1. Check if the output sgid10 connection file exists
1. Check if the sgid-internal input feature class exists
1. Copy the feature class to sgid10 named fc_temp
1. Run a function to delete the table locks on the old sgid10 feature class that's being replaced
1. Delete the sgid10 feature class that's being replaced
1. Rename the new copied feature class from fc_temp to fc
1. Update the privileges for the agrc and SearchAPI users

## Setup

### Production

1. `git clone https://github.com/agrc/swapper`
1. `cd swapper`
1. From within a virtual environment that has python 3.6+ and arcpy: `pip install .\ -U`
1. Set `SWAPPER_*` environment variables as outlined in [.env.sample].

### Development

1. Clone project.
1. Update `.env` file to be the correct path to the share folder.
1. From within a virtual environment that has python 3.6+ and arcpy: `pip install -e .[tests]`
1. `swapper ...`
1. `pytest`

## Usage

### CLI

Run `swapper` for usage information.

### From within other python code

```python
from swapper import swapper

swapper.copy_and_replace('sgid.boundaries.counties')
```
django-success-response 1.1.2
Django app for customizing response
License: MIT
Requires Python: >=3.6

# Django Success Response

`django-success-response` is a Django REST Framework extension that standardizes success and error response formats in API views. It simplifies response handling by providing a consistent structure and offers easy customization for data formats.

Official Docs: [django-success-response.moorfo.uz](http://django-success-response.moorfo.uz/)

## Installation

Install the package via pip:

```bash
pip install django-success-response
```

## Usage

### Standard Success Response

To return a standard success response, use `SuccessResponse` in your Django views.

#### Example:

```python
from success_response.response import SuccessResponse
from rest_framework.views import APIView

class MyView(APIView):
    @staticmethod
    def get(request):
        data = {'key': 'value'}
        return SuccessResponse(data)
```

#### Response:

```json
{
    "success": true,
    "result": {
        "key": "value"
    }
}
```

### Error Response

For error responses, set `success=False` and provide an error message.

#### Example:

```python
from success_response.response import SuccessResponse
from rest_framework.views import APIView

class MyView(APIView):
    @staticmethod
    def get(request):
        data = {'message': 'error'}
        return SuccessResponse(data, success=False)
```

#### Response:

```json
{
    "success": false,
    "error": {
        "message": "error"
    }
}
```

## Error Handling

To format all error responses using the `SuccessResponse` structure, configure the `EXCEPTION_HANDLER` in your `settings.py`:

```python
REST_FRAMEWORK = {
    'EXCEPTION_HANDLER': 'success_response.views.success_exception_handler'
}
```

## Generic Views and ViewSets

`django-success-response` provides customized DRF generic views and viewsets that automatically return responses in the `SuccessResponse` format.

### Available Views and ViewSets:

| Standard View                  | Success Equivalent                     |
|---------------------------------|----------------------------------------|
| `CreateAPIView`                 | `SuccessCreateAPIView`                 |
| `RetrieveAPIView`               | `SuccessRetrieveAPIView`               |
| `UpdateAPIView`                 | `SuccessUpdateAPIView`                 |
| `DestroyAPIView`                | `SuccessDestroyAPIView`                |
| `ListAPIView`                   | `SuccessListAPIView`                   |
| `RetrieveUpdateAPIView`         | `SuccessRetrieveUpdateAPIView`         |
| `RetrieveDestroyAPIView`        | `SuccessRetrieveDestroyAPIView`        |
| `RetrieveUpdateDestroyAPIView`  | `SuccessRetrieveUpdateDestroyAPIView`  |
| `ModelViewSet`                  | `SuccessModelViewSet`                  |
| `ReadOnlyModelViewSet`          | `SuccessReadOnlyModelViewSet`          |

These views behave like their DRF counterparts but automatically format responses using `SuccessResponse`.
cfbm 2025.2.1
CHIME/FRB Beam Model
License: MIT
Requires Python: <4.0,>=3.6

# CHIME/FRB Beam Model

Models describing the primary and formed beams for for Canadian Hydrogen Intensity Mapping Experiment FRB backend (CHIME/FRB).


## Installation

The package can be installed from PyPI using the following command:

```
pip install cfbm
```

To use the primary beam model, data for the beam must be downloaded after installation by: 

* Either running the script [cfbm/bm_data/get_data.py](https://github.com/chime-frb-open-data/chime-frb-beam-model/blob/main/cfbm/bm_data/get_data.py).

* Or from within python:
```
from cfbm.bm_data import get_data
get_data.main()
```

## Documentation

Check out the user documentation, [here](https://chime-frb-open-data.github.io/)