Pycloudflare
A Python client for CloudFlare
Install / Use
/learn @yola/PycloudflareREADME
pycloudflare
|Build Status|
A Python client for CloudFlare API v4 and Host API.
It provides two levels of integration against the CloudFlare API:
#. A low level API, with one method per API endpoint
(pycloudflare.services).
#. A high level ORM API (pycloudflare.models).
Only a subset of the CloudFlare API is currently supported:
- Users
- Zones
- Zone Settings
- DNS Records
- Page Rules
- User creation & authentication through CloudFlare's partner-facing Host API.
Usage
Get all our zones at CloudFlare
.. code:: python
>>> cf = CloudFlareService(api_key, email)
>>> for domain in cf.get_zones():
>>> print domain['name'], domain['id']
Configuration
The Host (Partner) API service client is configured when it is
instantiated and reads its configuration from configuration.json.
The configuration file should be in the format:
.. code:: json
{
"common": {
"cloudflare": {
"api_key": "HOST API KEY HERE",
}
}
}
Testing
Install development requirements::
pip install -r requirements.txt
Tests can then be run by doing::
nosetests
The integration tests require a host API key. They can be run with::
nosetests tests/test_integration.py
.. |Build Status| image:: https://travis-ci.org/yola/pycloudflare.svg?branch=master :target: https://travis-ci.org/yola/pycloudflare
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
