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

Commit

Permalink
still testing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Mar 5, 2024
1 parent f9b565a commit 1ae9c2a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ version: 2
# Optionally declare the Python requirements required to build your docs
python:
install:
- path: .
- requirements: docs/requirements.txt
- requirements: requirements.txt

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3"
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
builder: "html"

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
- epub
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PYLINT = pylint
TWINE = twine
PYTEST = pytest

SPHINX_RELEASE = 2.20.0
SPHINX_AUTHOR = Martin J. Levy
SPHINX_COPYRIGHT = Copyright (c) 2016 thru 2024, Cloudflare. All rights reserved.

EMAIL = "[email protected]"
NAME = "cloudflare"

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

docs: all
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'
@mkdir -p docs/_build docs/_static
sphinx-apidoc --force --module-first --separate --ext-autodoc -A "$(SPHINX_AUTHOR)" -R "$(SPHINX_RELEASE)" -V "$(SPHINX_RELEASE)" -o docs . 'setup.*'
sphinx-build -a -E -j auto -b html docs docs/_build/html

clean-docs: all
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

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

version = '2.20.0'
Expand Down
43 changes: 37 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,48 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to python-cloudflare's documentation!
=============================================
python-cloudflare - A Python-based access to Cloudflare's API's
===============================================================

Release v\ |version|.

.. image:: https://static.pepy.tech/badge/cloudflare/month
:target: https://pepy.tech/project/cloudflare
:alt: Requests Downloads Per Month Badge

.. image:: https://img.shields.io/pypi/l/cloudflare.svg
:target: https://pypi.org/project/cloudflare/
:alt: License Badge

.. image:: https://img.shields.io/pypi/wheel/cloudflare.svg
:target: https://pypi.org/project/cloudflare/
:alt: Wheel Support Badge

.. image:: https://img.shields.io/pypi/pyversions/cloudflare.svg
:target: https://pypi.org/project/cloudflare/
:alt: Python Version Support Badge

**python-cloudflare** is a Python library for easy access to Cloudflare's API's.

**Trivial example**::

>>> import CloudFlare
>>> cf = CloudFlare.cloudflare()
>>>
>>> cf.ips()
{'ipv4_cidrs': ['173.245.48.0/20', ... ], ... }
>>>

Refer to the `examples` directory for full examples.

The User Guide
--------------

.. toctree::
:maxdepth: 4
:caption: Contents:

CloudFlare
cli4
examples

.. include:: modules.rst

Indices and tables
==================
Expand Down
9 changes: 9 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
python-cloudflare
=================

.. toctree::
:maxdepth: 4

CloudFlare
cli4
examples

0 comments on commit 1ae9c2a

Please sign in to comment.