Skip to main content

Request to wiki-api.ir APIs

Project description

Python Wiki Client

python-wiki-client is a Python package for interacting with the wiki-api APIs. This package allows you to send GET requests to various URLs, retrieve responses, and work with the Wiki-API endpoints.

Prerequisites

To use this package, you need to have Python 3.6 or higher installed.

Installation

To install this package via pip, run the following command:

Install via PyPI

pip install wiki-api-client

Usage

Once the package is installed, you can use it in your Python project as follows:

Synchronous Example

from WikiClient import Get

wiki = Get.SyncAPI()

data = wiki.request(
    'apis-1/ChatGPT-4o', # API address in Wiki-API.ir without domain name
    {'q': 'hello'}       # Required data
)

print(data)

# Output:
# {'status_code': 200, 'body': {'status': True, 'channel': '@Wiki_API', 'site': 'Wiki-Api.ir', 'developers': '@B3dev, @Dumacel', 'results': 'Hi there! How can I help you today? 😊'}}

Asynchronous Example

If you want to make requests asynchronously, you can use the asynchronous version of the API:

from WikiClient import Get

wiki = Get.AsyncAPI()

async def sendReq():
    response = await wiki.request(
        'apis-1/ChatGPT-4o', # API address in Wiki-API.ir without domain name
        {'q': 'hello'}       # Required data
    )
    print(response)

# Output:
# {'status_code': 200, 'body': {'status': True, 'channel': '@Wiki_API', 'site': 'Wiki-Api.ir', 'developers': '@B3dev, @Dumacel', 'results': 'Hi there! How can I help you today? 😊'}}

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

wiki_api_client-1.0.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

wiki_api_client-1.0.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file wiki_api_client-1.0.2.tar.gz.

File metadata

  • Download URL: wiki_api_client-1.0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for wiki_api_client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e608b3fce756b50a64c4136f0f498788dcfe7041f591dda8c99093a89e50040a
MD5 f65d2cdf94b70d7eb57bde8074011daf
BLAKE2b-256 c3627df4780cc124b214f32312e50ef0774f53ba8de85b4599401797e26383bb

See more details on using hashes here.

File details

Details for the file wiki_api_client-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for wiki_api_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 732bc62bad62a7e7f2889b2e512362b8c69aba95df3ea1729325ce7eb807d237
MD5 14b004f62f1c91980ab544805cbbbde4
BLAKE2b-256 d05eb0ff0fa3b32db3bec396d88e25c0374267a6d0d05be5fe25ad5c935b8287

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