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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wiki_api_client-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 5eee13a4b31a5591b35cea4704389a38a461d1d9bececdbef8d028ae9c028b42
MD5 ede82c03c21f29d25df2310d081b6bca
BLAKE2b-256 d1a88c18cc1cfb720f5cd8ce99c745ba51ff83b3178c444af673d65e4135383e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wiki_api_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc7aadd24f825152902928aee25272466c84242b4d588d189c27292cfcaf461
MD5 1c887dcfe999239bfcb224773483cd28
BLAKE2b-256 580fc4ff3693dede3d587d86123a890e097afe51eba8b4e99661a16eb2bfe645

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