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.1.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.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wiki_api_client-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d427117dbc16ae843e9c1e04874057dc2449463c98fe0ecbc6eafc8a389ef83c
MD5 17f598af2775c91adb3755c6e017ff24
BLAKE2b-256 4e057e8d9565d9d37130224217f39bf3d02f5df514dd85625d02931fd520fa48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wiki_api_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c42f830f3772b0ceba83cbaf019fc41c1cf185e31d1869de492ded2415e79d8e
MD5 d171b3abb19a3c95172fc2c958de4d13
BLAKE2b-256 2df5f3b7a116f73adbbdf6502de6c7cd5d668f781f5c529511373bd9fe388353

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