semvec/pypi-packages huggingface dataset:
jdodata 1.0.16
Jianda Open Data
License: MIT
Keywords: 简答数据,jianda,jianda data,open data

简答数据开放数据
================

-  用户名密码申请请联系 wukehao@jddatatech.com。

环境要求
--------

python >= 3

安装
----

::

    python -m pip install jdodata

使用
----

::

    # 登陆
    from jdodata import OpenDataClient
    client = OpenDataClient(username="test", password="test") # 账号密码请联系 wukehao@jddatatech.com 索取.
     
    params = {
        "fund_code": "510080"
    }
     
    ret = client.ApiStockpediaFundNet_value.get(params=params)
     
    ret = client.ApiFund_assistantFundNet_value.get(params={"fund_code": "510080"})
flake8-wot 0.2.0
flake8 plugin which checks use of deprecated typing.List, typing.Dict, etc.
License: MIT

# flake8-wot
Flake8 plugin

This plugin warns if you are still importing List, Dict or Tuple (and others) from typing instead of using list, dict,
tuple.

See https://www.python.org/dev/peps/pep-0585/ for more information.

# Example

Running flake on a file test_wot.py with contents:

```python
from typing import List
```

will generate:

```
test_wot.py:1:1: WOT001 don't import type List
```

WOT is an abbreviation of 'Warn about Old school Types'
chocs-middleware.xray 1.0.0
Middleware to integrate aws x-ray with chocs.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: aws,x-ray,chocs,http,middleware

# chocs-aws-xray
AWS X-Ray middleware for chocs library.

## Installation 
through poetry:
```shell
poetry add chocs_middleware.xray
```
or through pip:
```shell
pip install chocs_middleware.xray
```

## Usage

The following snippet is the simplest integration example.

> Please note x-ray won't work in WSGI mode, it has to be deployed as aws lambda in order to work.
> 
```python
from chocs import Application, HttpResponse, serve
from chocs_middleware.xray import AwsXRayMiddleware

app = Application(AwsXRayMiddleware())


@app.get("/hello")
def say_hello(request):
    return HttpResponse("Hello")

serve(app)
```

### Setting up custom error handler

AWS X-Ray middleware provides a way to setup a custom error handler which may become handy when you
need to supplement your logs with additional information. Please consider the following example:

```python
from chocs import Application, HttpResponse, HttpStatus
from chocs_middleware.xray import AwsXRayMiddleware

def error_handler(request, error, segment):
    segment.add_exception(error)
    
    return HttpResponse("NOT OK", HttpStatus.INTERNAL_SERVER_ERROR)

app = Application(AwsXRayMiddleware(error_handler=error_handler))


@app.get("/hello")
def say_hello(request):
    raise Exception("Not Today!")
    return HttpResponse("Hello")

```

> To learn more about error_handler interface please click [here.]("./chocs_middleware/xray/middleware.py:16") 

### Accessing x-ray recorded from within your application layer
```python
from chocs import Application, HttpResponse
from chocs_middleware.xray import AwsXRayMiddleware

app = Application(AwsXRayMiddleware())

@app.get("/hello")
def say_hello(request):
    xray_recorder = request.attributes["aws_xray_recorder"] # Here is the instance of your recorder.
    
    return HttpResponse("OK")

```

That's all.