Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 1ae9c2a

Browse files
committed
still testing docs
1 parent f9b565a commit 1ae9c2a

File tree

5 files changed

+61
-9
lines changed

5 files changed

+61
-9
lines changed

.readthedocs.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@ version: 2
88
# Optionally declare the Python requirements required to build your docs
99
python:
1010
install:
11+
- path: .
1112
- requirements: docs/requirements.txt
1213
- requirements: requirements.txt
1314

1415
# Set the version of Python and other tools you might need
1516
build:
1617
os: ubuntu-22.04
1718
tools:
18-
python: "3"
19+
python: "3.11"
1920

2021
# Build documentation in the docs/ directory with Sphinx
2122
sphinx:
2223
configuration: docs/conf.py
24+
builder: "html"
25+
26+
# Optionally build your docs in additional formats such as PDF and ePub
27+
formats:
28+
- pdf
29+
- epub

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PYLINT = pylint
55
TWINE = twine
66
PYTEST = pytest
77

8+
SPHINX_RELEASE = 2.20.0
9+
SPHINX_AUTHOR = Martin J. Levy
10+
SPHINX_COPYRIGHT = Copyright (c) 2016 thru 2024, Cloudflare. All rights reserved.
11+
812
913
NAME = "cloudflare"
1014

@@ -103,7 +107,8 @@ sign:
103107
ls -l tarball/$$v.tar.gz.asc tarball/$$v.zip.asc ;
104108

105109
docs: all
106-
sphinx-apidoc --force --module-first --separate --full --ext-autodoc -A 'Martin J Levy' -R 2.20.0 -V 2.20.0 -o docs . 'setup.py'
110+
@mkdir -p docs/_build docs/_static
111+
sphinx-apidoc --force --module-first --separate --ext-autodoc -A "$(SPHINX_AUTHOR)" -R "$(SPHINX_RELEASE)" -V "$(SPHINX_RELEASE)" -o docs . 'setup.*'
107112
sphinx-build -a -E -j auto -b html docs docs/_build/html
108113

109114
clean-docs: all

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

99
project = 'python-cloudflare'
10-
copyright = '2024, Martin J Levy'
10+
copyright = 'Copyright (c) 2016 thru 2024, Cloudflare. All rights reserved.'
1111
author = 'Martin J Levy'
1212

1313
version = '2.20.0'

docs/index.rst

+37-6
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,48 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to python-cloudflare's documentation!
7-
=============================================
6+
python-cloudflare - A Python-based access to Cloudflare's API's
7+
===============================================================
8+
9+
Release v\ |version|.
10+
11+
.. image:: https://static.pepy.tech/badge/cloudflare/month
12+
:target: https://pepy.tech/project/cloudflare
13+
:alt: Requests Downloads Per Month Badge
14+
15+
.. image:: https://img.shields.io/pypi/l/cloudflare.svg
16+
:target: https://pypi.org/project/cloudflare/
17+
:alt: License Badge
18+
19+
.. image:: https://img.shields.io/pypi/wheel/cloudflare.svg
20+
:target: https://pypi.org/project/cloudflare/
21+
:alt: Wheel Support Badge
22+
23+
.. image:: https://img.shields.io/pypi/pyversions/cloudflare.svg
24+
:target: https://pypi.org/project/cloudflare/
25+
:alt: Python Version Support Badge
26+
27+
**python-cloudflare** is a Python library for easy access to Cloudflare's API's.
28+
29+
**Trivial example**::
30+
31+
>>> import CloudFlare
32+
>>> cf = CloudFlare.cloudflare()
33+
>>>
34+
>>> cf.ips()
35+
{'ipv4_cidrs': ['173.245.48.0/20', ... ], ... }
36+
>>>
37+
38+
Refer to the `examples` directory for full examples.
39+
40+
The User Guide
41+
--------------
842

943
.. toctree::
1044
:maxdepth: 4
1145
:caption: Contents:
1246

13-
CloudFlare
14-
cli4
15-
examples
16-
47+
.. include:: modules.rst
1748

1849
Indices and tables
1950
==================

docs/modules.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
python-cloudflare
2+
=================
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
CloudFlare
8+
cli4
9+
examples

0 commit comments

Comments
 (0)