Skip to main content
# Jest

Jest is a IPython magic tool to make us one or more HTTP request(s) in a cell.

## How it works

```
$ pip install pyjest
```

## Examples

Please take a look at the `examples` folder about how Jest can be used in a Jupyter notebook in more detail. The snippets below represent a sequence of three cells each of which shows how we can construct a jest call along with required fields for two HTTP calls in one run.

```
[1] consumes = [
dict(original_keyword='iphone'),
dict(original_keyword='phone')
]
```

The `consumes` variable holds a list of dictionary. Two different items will be used while jesting a request with a request body.

```
[2] %%jest --var responses --params consumes

{
"url": "http://localhost:8080/path",
"request": "post",
"body": {
"field": "@original_keyword",
"field": 1
},
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer ASDASADAS",
"Cookie": "auth_cookie=ASDADASDA"
}
}
```

Jest saves the response in to the `responses` field. We use `--params` to add that Jest will use it to load data from. The request body references a field name with suffix `@`. So that Jest understands that the referenced field must be in each item of `consumes`.

```
len(responses) # 2 for each item of `consumes`
```

After having a successful request, we can react the result via `responses`.

## License

MIT


Metadata

Release files for pyjest 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjest 0.0.3
File Size Uploaded Provenance Actions
pyjest-0.0.3.tar.gz 4.8 kB Without provenance Details for pyjest-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyjest 0.0.3
File Interpreter ABI Platform Actions
pyjest-0.0.3-py3-none-any.whl Python 3 none any Details for pyjest-0.0.3-py3-none-any.whl

Total release size: 10.3 kB

Release files / pyjest-0.0.3.tar.gz

Download URL pyjest-0.0.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dff61593bbd5b013e1e875507d7208bc43d857d760b747fd1cd5444cf90c1ddb
BLAKE2b-256 checksum
How to use checksums
b9ca78701be0b2e1f44240431741e79d8e55e79917a8005df18c049dfa29b110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

Release files / pyjest-0.0.3-py3-none-any.whl

Download URL pyjest-0.0.3-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d501da1a80761dd0cc14260926888ace18e129b3c3fa2a335024e932e21a057d
BLAKE2b-256 checksum
How to use checksums
e5b6cba13a7a4af036fef05a52132ddd4d3d39fb09f4d0929c13890e68942e80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

Security for pyjest 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page