semvec/pypi-packages huggingface dataset:
aws-manifest 0.1.0
Package for retrieving aws resource names and their actions
License: MIT
Requires Python: >=3.4.0


# aws-manifest

A python package for retrieving information about aws's api manifest consisting
of resources and their actions.

## Getting Started

`pip3 install aws-manifest`

## Usage

```
from awsmanifest import manifest, AwsManifest

# Retrieve the latest set of aws resources
m = manifest()
print(m["serviceMap"]["Amazon Ec2]["Actions])

# Retrieve the bundled local copy of aws resources
m = manifest(local=True)
...

# For helper functions, use the `AwsManifest` class
a = AwsManifest()
print(a.service_prefixes())
print(a.actions("Amazon Ec2))
print(a.actions("s3))
...
```

# Licensing

MIT
sfplot 0.0.1
Search records of pandas dataframe from plot.
License: MIT

Search From Plot
================

概要
----

| 散布図または箱ひげ図からデータを抽出することができます
| 関数を呼び出すと、tkウィンドウが立ち上がります
| ウィンドウに表示された図上をドラッグすることで範囲を指定でき、
| 範囲内にプロットされているデータをDataFrameで受け取ることができます

jupyter notebook上で使うことを想定しています

インストール
------------

.. code:: bash

    $ pip install sfplot

使い方
------

サンプルデータにirisデータセットを利用します

.. code:: python

    from sklearn.datasets import load_iris
    import seaborn as sns
    iris_dataset = sns.load_dataset('iris')
    iris_dataset.head(10)

|image0|

対散布図からデータを抽出
~~~~~~~~~~~~~~~~~~~~~~~~

-  | pandas
     DataFrameと、散布図にしたいカラム名を引数にしてSearchFromPlotを起動します
   | 引数x,yには数値(int, float)型のカラムのみ指定可能です

   .. code:: python

       import sfplot
       search_result_df = sfplot.scatter(iris_dataset, x='sepal_length', y='sepal_width')

-  | ウィンドウが起動します
   | |image1|

-  | 取得したいデータの範囲をドラッグします
   | |image2|

-  | 「4件取得」と書かれたボタンを押下すると、ウィンドウが閉じ、
   | 選択範囲内のレコードを抽出したDataFrameを返却します

   .. code:: python

       search_result_df

   |image3|

-  | 一度に複数回範囲を選択することも可能です
   | |image4|
   | |image5|

箱ひげ図からデータを抽出
~~~~~~~~~~~~~~~~~~~~~~~~

-  | pandas
     DataFrameと、箱ひげ図にしたいカラム名を引数にしてSearchFromPlotを起動します
   | 引数xにはobject型のカラム、引数yには数値(int,
     float)型のカラムのみ指定可能です

   .. code:: python

       search_result_df = sfplot.boxplot(iris_dataset, x='species', y='sepal_width')

-  | ウィンドウが起動します
   | |image6|

-  操作方法は対散布図と同様です

.. |image0| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_01.png
.. |image1| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_02.png
.. |image2| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_03.png
.. |image3| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_04.png
.. |image4| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_05.png
.. |image5| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_06.png
.. |image6| image:: https://gitlab.com/kegeppa/public/raw/master/SearchFromPlot/.sample_images/image_07.png
asgi-s3 0.0.3
ASGI S3 storage
License: MIT

# asgi-s3

<a href="https://pypi.org/project/asgi-s3/">
    <img src="https://badge.fury.io/py/asgi-s3.svg" alt="Package version">
</a>
<a href="https://travis-ci.org/erm/asgi-s3">
    <img src="https://travis-ci.org/erm/asgi-s3.svg?branch=master" alt="Build Status">
</a>


Static file management tools and [ASGI](https://asgi.readthedocs.io/en/latest/) middleware support for [Amazon S3](https://aws.amazon.com/s3/). 

**Work in Progress**: A lot of what is here currently will be changing, not recommended for any serious usage at this point.

**Requirements**: Python 3.6+

## Installation

```shell
pip install asgi-s3
```

...but you probably just want to clone the `master` branch for the moment.

## CLI

```shell
s3 create-bucket  Create a new S3 bucket.

s3 list-buckets   List all S3 buckets.

s3 sync-bucket    Sync a bucket with a local static file directory.
```

...todo

## Middleware

The middleware is designed to work with any ASGI application. Here is raw ASGI example:

```python
from asgi_s3.middleware import S3StorageMiddleware, s3_url_for


AWS_ACCESS_KEY_ID = "access-key-id"
AWS_SECRET_ACCESS_KEY = "secret-access-key"
BUCKET_NAME = "my-bucket"
REGION_NAME = "region-name"
STATIC_DIR = "path/to/static/files"


async def app(scope, receive, send):
    await send(
        {
            "type": "http.response.start",
            "status": 200,
            "headers": [[b"content-type", b"text/html; charset=utf-8"]],
        }
    )
    html_content = f"""
    <!DOCTYPE html>
    <html>
    <head>
        <title>ASGI S3 example</title>
        <link rel="stylesheet" href="{s3_url_for('style.css')}">
    </head>
    <body>
    Hello, world.
    </body>
    </html>
    """
    await send({"type": "http.response.body", "body": html_content.encode()})


app = S3StorageMiddleware(
    app,
    bucket_name=BUCKET_NAME,
    static_dir=STATIC_DIR,
    region_name=REGION_NAME,
    aws_access_key_id=AWS_ACCESS_KEY_ID,
    aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
)
```

And here is an example using [Starlette](https://www.starlette.io/):

```python
from starlette.applications import Starlette
from starlette.templating import Jinja2Templates

from asgi_s3.middleware import S3StorageMiddleware, s3_url_for


templates = Jinja2Templates("templates")
app = Starlette()

@app.route("/")
def homepage(request):
    return templates.TemplateResponse(
        "index.html", {"request": request, "s3_url_for": s3_url_for}
    )


AWS_ACCESS_KEY_ID = "access-key-id"
AWS_SECRET_ACCESS_KEY = "secret-access-key"
BUCKET_NAME = "my-bucket"
REGION_NAME = "region-name"
STATIC_DIR = "path/to/static/files"


app.add_middleware(
    S3StorageMiddleware,
    bucket_name=BUCKET_NAME,
    static_dir=STATIC_DIR,
    region_name=REGION_NAME,
    aws_access_key_id=AWS_ACCESS_KEY_ID,
    aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
)
```