Skip to main content
https://img.shields.io/pypi/v/xrea.svg https://img.shields.io/pypi/l/xrea.svg https://img.shields.io/pypi/pyversions/xrea.svg

This package is simple implementation of XREA API(https://apidoc.xrea.com) wrapper with Python 3.

“XREA” is the web hosting service in Japan.

Short description in Japanese

このPythonパッケージはXREA API(https://apidoc.xrea.com)のラッパーです。 Python3系(3.4以降)で使えます。

Supported services

Requirements

works with

  • Python 3.4+

  • requests

Installation

via pipenv

$ pipenv install xrea

via pip

$ pip install xrea

via setup.py

$ python setup.py install

Examples

Init:

>>> from xrea import Xrea # for CoreServer: from xrea import CoreServer
...
... account = "foo" # your account
... server_name = "z123456.xrea.com" # your server
... api_secret_key = "zajxTrzkHBGkRRfvWs5w397jZFqQKC8L" # your api_secret_key
>>> xrea = Xrea(account=account, server_name=server_name, api_secret_key=api_secret_key)

# for CoreServer
# xrea = CoreServer(account=account, server_name=server_name, api_secret_key=api_secret_key)

Call site/list without optional params:

>>> response = xrea.site.list()
>>> pprint(response.result)
{'1': {'domain': 'blank',
       'ip': '11.22.33.44,
       'no': 1,
       'nodir': 0,
       'phpver': 'php71',
       'redirect_url': '',
       'ssl_info': [],
       'ssl_status': 0},
 '2': {'domain': 'abcde.example.info',
       'ip': '11.22.33.44',
       'no': 2,
       'nodir': 0,
       'phpver': 'php71',
       'redirect_url': '',
       'ssl_info': [],
       'ssl_status': 1}}

Call log/log_list with optional params:

>>> response2 = xrea.log.log_list(type='analog')
>>> pprint(response2.result)
{'abcde.example.info': [{'filedate': '2018-01-14',
                         'filename': 'abcde.example.info.html'},
                        {'filedate': '2018-01-13',
                         'filename': 'abcde.example.info.1.html'}]}

Call aaa/bbb (not valid)

>>> response3 = xrea.aaa.bbb(foo='12345')
xrea.error.XreaApiResponseError: [status: 404, error: 100002]page_name:正しくありません

Author

NAKAMORI Ryosuke - https://github.com/tpdn

Licence

BSD-2-Clause

Metadata

Release files for xrea 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xrea 0.1.1
File Size Uploaded
xrea-0.1.1.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xrea 0.1.1
File Interpreter ABI Platform
xrea-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / xrea-0.1.1.tar.gz

Download URL xrea-0.1.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ecf58cbdcd63c2e5009a4acc8e49856903472c00026da00e72c4c368af991d0a
BLAKE2b-256 checksum
How to use checksums
fdc41b3c7929ec7654f4db2e46dea3c474160e9278f6cda300694d29804278ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / xrea-0.1.1-py3-none-any.whl

Download URL xrea-0.1.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abf09c3573b5c3f93dd17e1e93e9fb31a75d6588f8263efe105ca5ac7302090f
BLAKE2b-256 checksum
How to use checksums
df6b7da3333db479d762d4a9f7ddc7f10344cd88fcb25d518eec28afa3e38fe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page