semvec/pypi-packages huggingface dataset:
django-social-connector 0.1.0
A Sample Django application for exchanging tokens with Instagram Basic Display API
License: MIT
Requires Python: >=3.8
Keywords: api, django, instagram, sample

# django-social-connector

A sample Django app for OAuth Token Exchange to support Instagram Basic Display API.

> [!CAUTION] 
> **This app is not meant for production.** It lacks certain security features and certain customization options 
> which must be implemented based on the exact use case. It will **only work in `DEBUG` mode**, for development.

Use this app for **development only** and as a guide for adding your own token exchange backend endpoint.

## Adding to Django:
1. Install from PyPi:
`pip install django-social-connector`

2. Add to INSTALLED_APPS:
```py
# settings.py
INSTALLED_APPS = [
    # ...
    "social_connector",
    # ...
]
```

3. Add `INSTAGRAM_APP_ID` and `INSTAGRAM_SECRET` settings:
```py
# settings.py
import os

INSTAGRAM_APP_ID = os.environ.get("INSTAGRAM_APP_ID")
INSTAGRAM_SECRET = os.environ.get("INSTAGRAM_SECRET")
```
Note: Your `INSTAGRAM_SECRET` should be loaded and stored as a **secret key**. How to do that properly is outside the scope
of this guide and depends on your environment.

4. Add a token endpoint to your URLs:
```py
# urls.py
from django.urls import path
from social_connector.views import ig_token

urlpatterns = [
    # ...
    path('ig_token/', ig_token, name="ig_token"),
    # ...
]
```
You can customize the path and the name as needed.

5. The endpoint is ready for use in development. 

## Troubleshooting
### CORS Settings
Make sure your frontend host is allowed for CORS requests in Django.

## Moving to Production
***This app is for demonstration and development use only.***

For production, create your own view in your own codebase.

For being Production ready, the endpoint should have at least the following additional safeguards:
* CSRF protection
* Throttling (limited amount of requests per user per time)
* Further input checks and sanitation before sending the API request to Instagram
* Might require the user being logged in, depending on the specific app's use case

Adding these features will bloat this minimal sample, especially when trying to reduce requirements.
Implementation of some of these features also depend on your specific use case.
bmcs-shell 0.0.8
Model components for analysis of BMCS shells.
License: MIT
Requires Python: >=3.6.0


# BMCS Shell

![folded textile reinforced concrete shell based on waterbomb origami pattern](assets/wb_concrete_shell.jpg "Screenshot from the interactive waterbomb geometries generator app")

Framework for numerical modeling and the development of geometries and production processes of brittle-matrix composite shells.
Currently, the focus is on developing flexible foldable shell geometries based on origami waterbomb patterns.

## Content
### Geometry
* **Waterbomb-based geometries**
  * Shells based on symmetric 4 parameters waterbomb base
  ![screenshot from an app to produce shell geometries based on the origami waterbomb tessellation](assets/4p_waterbomb_shell_app_screenshot.png "Screenshot from the interactive waterbomb geometries generator app")

  * Slabs based on Symmetric 4 parameters waterbomb base\
  ![screenshot from an app to produce slab geometries based on the origami waterbomb tessellation](assets/4p_waterbomb_slab_app_screenshot.png "Screenshot from the interactive waterbomb geometries generator app")

  * Shells based on semi-symmetric 5 parameters waterbomb base 
  ![screenshot from an app to produce twisted shell geometries based on the origami waterbomb tessellation](assets/5p_waterbomb_shell_app_screenshot.png "Screenshot from the interactive waterbomb geometries generator app")

### Numerical structural analysis
Pending

### Production processes
Pending

## Installation

### Dependencies

Dependencies on `gmsh` and `pygmsh` included in `environment.yml` 
Anaconda versioning seems not up to date.

Problem with dependencies in `pyface` with a missing 
dependency on `anaconda` cloud. As a fix,`importlib-resources`
that was reported as missing has been included in environment.
fastapi-filters-wbarnha 0.2.10
fastapi-filters, just a fork to experiment with
License: MIT
Requires Python: <4.0,>=3.8

<h1 align="center">
<img alt="logo" src="https://raw.githubusercontent.com/uriyyo/fastapi-filters/main/logo.png">
</h1>

<div align="center">
<img alt="license" src="https://img.shields.io/badge/License-MIT-lightgrey">
<img alt="test" src="https://github.com/uriyyo/fastapi-filters/workflows/Test/badge.svg">
<img alt="codecov" src="https://codecov.io/gh/uriyyo/fastapi-filters/branch/main/graph/badge.svg?token=QqIqDQ7FZi">
<a href="https://pepy.tech/project/fastapi-filters"><img alt="downloads" src="https://pepy.tech/badge/fastapi-filters"></a>
<a href="https://pypi.org/project/fastapi-filters"><img alt="pypi" src="https://img.shields.io/pypi/v/fastapi-filters"></a>
<img alt="black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
</div>

## Introduction

`fastapi-filters` is a library that provides filtering/sorting feature for [FastAPI](https://fastapi.tiangolo.com/)
applications.

----

## Installation

```bash
pip install fastapi-filters
```

## Quickstart

To create filters you need either define them manually using `create_filters` function or automatically generate them
based on model using `create_filters_from_model` function.

```py
from typing import List

from fastapi import FastAPI, Depends
from pydantic import BaseModel, Field

# import all you need from fastapi-filters
from fastapi_filters import create_filters, create_filters_from_model, FilterValues

app = FastAPI()  # create FastAPI app


class UserOut(BaseModel):  # define your model
    name: str = Field(..., example="Steve")
    surname: str = Field(..., example="Rogers")
    age: int = Field(..., example=102)


@app.get("/users")
async def get_users_manual_filters(
    # manually define filters
    filters: FilterValues = Depends(create_filters(name=str, surname=str, age=int)),
) -> List[UserOut]:
    pass


@app.get("/users")
async def get_users_auto_filters(
    # or automatically generate filters from pydantic model
    filters: FilterValues = Depends(create_filters_from_model(UserOut)),
) -> List[UserOut]:
    pass
```

Currently, `fastapi-filters` supports `SQLAlchemy` integration.

```py
from fastapi_filters.ext.sqlalchemy import apply_filters


@app.get("/users")
async def get_users(
    db: AsyncSession = Depends(get_db),
    filters: FilterValues = Depends(create_filters_from_model(UserOut)),
) -> List[UserOut]:
    query = apply_filters(select(UserOut), filters)
    return (await db.scalars(query)).all()
```