Skip to main content

mgun

https://badge.fury.io/py/mgun.svg https://travis-ci.org/maximdanilchenko/mgun.svg https://codecov.io/gh/maximdanilchenko/mgun/branch/master/graph/badge.svg

HTTP REST Json Client based on requests with dynamic url building

Install

pip install mgun

Quickstart

from mgun import HttpClient

client = HttpClient('https://httpbin.org', headers={'Authorization': '123'})  # headers - optional

resp = client.anything.api.users[23].address.get({'q': '12'})

print(resp.status)  # 200
print(resp.data['url'])  # https://httpbin.org/anything/api/users/23/address?q=12
print(resp.data['headers']['Authorization'])  # 123

Queries in one session

with client.session() as s:  # also possible: with client.s() as s:
    resp1 = client.anything.api.users.get({'limit': '10'}, session=s)  # request in this session
    client.anything.api.users[23].post({'data': [1, 2, 3]}, s)  # shorter
    client.anything.api.users[23].patch({'name': 'alex'}, s)

Metadata

Release files for mgun 0.1.8

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

Built distribution (wheel)

Table of built distributions (wheels) for mgun 0.1.8
File Interpreter ABI Platform Actions
mgun-0.1.8-py2-none-any.whl Python 2 none any Details for mgun-0.1.8-py2-none-any.whl

Release files / mgun-0.1.8-py2-none-any.whl

Download URL mgun-0.1.8-py2-none-any.whl
Size 4.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
f30a573bcbc427618e6f89ed307c82d45f981b94672cd5e12088130972169899
BLAKE2b-256 checksum
How to use checksums
ff4a26113c2c85a1cce509872af6c071a7b46684eb1b1ca7886370e9c519a572
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mgun 0.1.8

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