Skip to main content

`abstract_apis` is a Python module designed to streamline HTTP request operations by abstracting away common setup procedures and processing details. It provides tools for constructing URLs and handling JSON data serialization automatically, making it easier to integrate API calls in your applications.

Project description


Abstract APIs

abstract_apis is a Python module designed to streamline HTTP request operations by abstracting away common setup procedures and processing details. It provides tools for constructing URLs and handling JSON data serialization automatically, making it easier to integrate API calls in your applications.

Features

  • Automates the creation and management of headers for JSON requests.
  • Ensures JSON data serialization for outgoing requests.
  • Provides utility functions to strip characters from strings and construct well-formed endpoints and URLs.
  • Simplified functions for making GET and POST requests with optional endpoint concatenation.

Installation

You can install the abstract_apis package directly from PyPI (when available):

pip install abstract_apis

Usage

Making a POST Request

To make a POST request to a specific endpoint with JSON data:

from abstract_apis import make_requests

url = "https://api.example.com"
endpoint = "submit"
data = {"key": "value"}
response = make_requests.getPostRequest(url, data, endpoint=endpoint)
print(response)

Making a GET Request

To make a GET request to a specific endpoint with query parameters:

from abstract_apis import make_requests

url = "https://api.example.com"
endpoint = "fetch"
params = {"query": "info"}
response = make_requests.getGetRequest(url, params, endpoint=endpoint)
print(response)

Dependencies

  • Python 3.6+
  • requests library

Ensure you have the requests library installed:

pip install requests

Contributions

Contributions are welcome! Please fork the repository on GitHub and submit a pull request with your changes.

License

This project is licensed under the terms of the MIT license.

Contact

For any queries or collaboration opportunities, please reach out via email at partners@abstractendeavors.com.


This README provides an updated overview of your module, focusing on its new functionalities, with clear examples of how to use the extended URL manipulation features. Adjust the content to better fit your full module’s capabilities and documentation standards as needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abstract_apis-0.0.0.2.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

abstract_apis-0.0.0.2-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page