Skip to main content

This library was developed to simplify handling HTTP requests, logging responses, and deriving statistics from them. It provides tools for testing and monitoring the performance of endpoints and generating detailed reports on successful and non-successful responses.

Project description

API Arsenal

Python Version License

Description

This library was developed to simplify handling HTTP requests, logging responses, and deriving statistics from them. It provides tools for testing and monitoring the performance of endpoints and generating detailed reports on successful and non-successful responses.

Core Features

HTTP Request Handling:

  • Log HTTP responses into an array for further analysis.
  • Check if a response is successful (status code 2xx).

Response Statistics:

  • Calculate minimum, maximum, and average response times.
  • Display statistics about all logged responses.

Logging:

  • Securely log usernames and passwords to a file using encryption.
  • Log response statistics to a file.

Response Printing:

  • Print detailed information about a response, including the response body.
  • Print brief information about a response (status code, elapsed time, etc.).
  • Print all logged responses with details.
  • Print only successful responses with details.
  • Print only non-successful responses with details.

Utility Functions:

  • Generate random usernames, passwords, letters, numbers, and symbols for testing.

History Logging:

  • Display a history of logged credentials.
  • Display a history of logged statistics.”

Installation

To install the library, you can use pip:

pip install api-arsenal

Usage

Simple Example

from api_arsenal import api_arsenal import requests # Create a utility object utility = api_arsenal() # Send an HTTP request response = requests.get('https://api.example.com/data') utility.push_response(response, 'Example Endpoint') # Print statistics utility.print_stats()

More Examples

# Print all responses with details utility.print_all_detailed() # Print only successful responses utility.print_successful_detailed_only() # Log credentials to a file utility.log_user_credentials_in_file(comments='Test User')

License

This project is licensed under the MIT License.

Contact

If you have any questions or inquiries, you can contact me via email. iabdullahban@gmail.com

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

api_arsenal_iabdullahban-0.0.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

api_arsenal_iabdullahban-0.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file api_arsenal_iabdullahban-0.0.2.tar.gz.

File metadata

File hashes

Hashes for api_arsenal_iabdullahban-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dc2b28144863617d02d378726043305547d3acf30aac0d1e0fd0fbe4937cdf66
MD5 a6b9c7827b3582c28afbe1a9b07102f5
BLAKE2b-256 5e754880f2043a9cf0e3bc6b6e14cad4ff61601fb931c5373e0434eadcd0f03f

See more details on using hashes here.

File details

Details for the file api_arsenal_iabdullahban-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for api_arsenal_iabdullahban-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f08de6edff8770939331edb184002a066fa39681b3d969860e82a7ba38934bc
MD5 7e1530ae884ea1bc379eb39b6dbbba75
BLAKE2b-256 fbdec16037589c23b9e3a6bcd81e50e7c5f45af520487e21899bcbcaaeeb802c

See more details on using hashes here.

Supported by

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