Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
66b0739
WIP
LKaemmerling Dec 28, 2018
4a90ddc
WIP
LKaemmerling Feb 4, 2019
52d6e74
WIP
LKaemmerling Feb 4, 2019
cb57322
WIP
LKaemmerling Feb 5, 2019
8b66776
Add volume domain
LKaemmerling Feb 5, 2019
4285549
Add Usage For Datacenters, ISOs, Locations and Server Types
LKaemmerling Feb 5, 2019
6f4563b
Add Floating IP Docs
LKaemmerling Feb 5, 2019
c6e8e7e
Add Actions
LKaemmerling Feb 5, 2019
c9394c1
Use `None` instead of null
LKaemmerling Feb 5, 2019
8f24d97
Add Section about Error Handling
LKaemmerling Feb 5, 2019
307c8d4
Fix some wrong steps for releasing
LKaemmerling Feb 11, 2019
633a2cb
Document the master merged changes
LKaemmerling Feb 15, 2019
2e40e46
WIP
LKaemmerling Feb 15, 2019
30edc08
Fix tests
LKaemmerling Feb 15, 2019
eae98e6
Fix tests
LKaemmerling Feb 15, 2019
5f6baae
Add Isos and SSH Keys Documentation
LKaemmerling Feb 15, 2019
1fdd074
Add Server Documentation
LKaemmerling Feb 18, 2019
cc280bb
Add Image Documentation
LKaemmerling Feb 18, 2019
e2e0a92
Add Volume Documentation
LKaemmerling Feb 18, 2019
b2fb356
Apply suggestions from code review
LKaemmerling Feb 18, 2019
44f44a4
Add open in new tab
LKaemmerling Feb 18, 2019
65eb58a
Add all missing domains and code documentations
LKaemmerling Feb 19, 2019
e903712
Remove "domain" folder because we have now everything in the API docs
LKaemmerling Feb 19, 2019
581a475
Add missing :
LKaemmerling Feb 20, 2019
2418eb3
Remove unused file
LKaemmerling Feb 20, 2019
440744e
Apply suggestions from code review
LKaemmerling Feb 20, 2019
5e1419b
Remove Usage Section
LKaemmerling Feb 20, 2019
b155087
Merge remote-tracking branch 'origin/master' into documentation
LKaemmerling Feb 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions AUTHORS.md

This file was deleted.

File renamed without changes.
47 changes: 23 additions & 24 deletions CONTRIBUTING.md → CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ helps, and credit will always be given.
You can contribute in many ways:

Types of Contributions
----------------------
-----------------------

Report Bugs
~~~~~~~~~~~
~~~~~~~~~~~~

Report bugs at https://github.com/hetznercloud/hetznercloud-python/issues.
Report bugs at https://github.com/hetznercloud/hcloud-python/issues.

If you are reporting a bug, please include:

Expand All @@ -22,28 +22,28 @@ If you are reporting a bug, please include:
* Detailed steps to reproduce the bug.

Fix Bugs
~~~~~~~~
~~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.

Implement Features
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.

Write Documentation
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~

Hetzner Cloud Python could always use more documentation, whether as part of the
official Hetzner Cloud Python docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/hetznercloud/hetznercloud/issues.
The best way to send feedback is to file an issue at https://github.com/hetznercloud/hcloud-python/issues.

If you are proposing a feature:

Expand All @@ -53,19 +53,19 @@ If you are proposing a feature:
are welcome :)

Get Started!
------------
-------------

Ready to contribute? Here's how to set up `hetznercloud-python` for local development.
Ready to contribute? Here's how to set up `hcloud-python` for local development.

1. Fork the `hetznercloud-python` repo on GitHub.
1. Fork the `hcloud-python` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/hetznercloud-python.git
$ git clone git@github.com:your_name_here/hcloud-python.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv hetznercloud-python
$ cd hetznercloud-python/
$ mkvirtualenv hcloud-python
$ cd hcloud-python/
$ python setup.py develop

4. Create a branch for local development::
Expand All @@ -92,7 +92,7 @@ Ready to contribute? Here's how to set up `hetznercloud-python` for local develo
7. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------
------------------------

Before you submit a pull request, check that it meets these guidelines:

Expand All @@ -101,26 +101,25 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.5 and 3.6, and for PyPy. Check
https://travis-ci.org/hetznercloud/hetznercloud-python/pull_requests
https://travis-ci.org/hetznercloud/hcloud-python/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
----
-----

To run a subset of tests::

$ py.test tests.test_hetznercloud


Deploying
---------
How to release
---------------

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
A reminder for the maintainers on how to release a new version.
Make sure all your changes are committed (including an entry in CHANGELOG.rst).
Then run::

$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
1. Change the version under /hcloud/version.py
2. Push the change to the `master` branch and tag an new release through the `Github UI <https://github.com/hetznercloud/hcloud-python/releases>`_.

Travis will then deploy to PyPI if tests pass.
7 changes: 3 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include AUTHORS.md
include CONTRIBUTING.md
include CHANGELOG.md
include CONTRIBUTING.rst
include CHANGELOG.rst
include LICENSE
include README.md
include README.rst

recursive-include tests *
recursive-exclude * __pycache__
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@ coverage: ## check code coverage quickly with the default Python
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/hcloud.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ hcloud
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html
$(BROWSER) docs/_build/html/index.html

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
Expand Down
45 changes: 27 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,33 @@ Hetzner Cloud Python

.. image:: https://travis-ci.com/hetznercloud/hcloud-python.svg?branch=master
:target: https://travis-ci.com/hetznercloud/hcloud-python

.. image:: https://readthedocs.org/projects/hcloud-python/badge/?version=latest
:target: https://hcloud-python.readthedocs.io



**IMPORTANT: This project is still in development and not ready production yet!**

Official Hetzner Cloud python library

The library's documentation is available at `ReadTheDocs`_, the public API documentation is available at https://docs.hetzner.cloud.

* Free software: MIT license
* Documentation: https://hcloud-python.readthedocs.io.
* API Reference: https://docs.hetzner.cloud.
.. _ReadTheDocs: https://hcloud-python.readthedocs.io

Usage example
-------------

Setup Dev environment
After the documentation has been created, click on `Usage` section

Or open `docs/usage.rst`

You can find some more examples under `examples/`.


Development
-----------

Setup Dev Environment
---------------------
1) `mkvirtualenv hcloud-python`

Expand All @@ -27,25 +41,20 @@ Run tests
---------
* `tox .`
* You can specify environment e.g `tox -e py36`


* You can test the code style with `tox -e flake8`

Create Documentation
--------------------

Run `make docs`. This will also open a documentation in a tab in your default browser.


Usage example
-------------

After the documentation has been created, click on `Usage` section

Or open `docs/usage.rst`

You can find some more examples under `examples/`.


Style Guide
-------------
* **Type Hints**: If the type hint line is too long use inline hinting. Maximum inline type hint line should be 150 chars.
* **Type Hints**: If the type hint line is too long use inline hinting. Maximum inline type hint line should be 150 chars.

License
-------------
The MIT License (MIT). Please see `License File`_ for more information.

.. _License File: https://github.com/hetznercloud/hcloud-python/blob/master/LICENSE
3 changes: 3 additions & 0 deletions docs/_static/js/open_links_in_new_tab.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(document).ready(function() {
$("a[href^='http']").attr('target','_blank');
});
7 changes: 7 additions & 0 deletions docs/_static/logo-hetzner-online.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/api.clients.actions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ActionsClient
==================


.. autoclass:: hcloud.actions.client.ActionsClient
:members:

.. autoclass:: hcloud.actions.client.BoundAction
:members:

.. autoclass:: hcloud.actions.domain.Action
:members:

16 changes: 16 additions & 0 deletions docs/api.clients.datacenters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DatacentersClient
==================


.. autoclass:: hcloud.datacenters.client.DatacentersClient
:members:

.. autoclass:: hcloud.datacenters.client.BoundDatacenter
:members:

.. autoclass:: hcloud.datacenters.domain.Datacenter
:members:

.. autoclass:: hcloud.datacenters.domain.DatacenterServerTypes
:members:

15 changes: 15 additions & 0 deletions docs/api.clients.floating_ips.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Floating IPsClient
==================


.. autoclass:: hcloud.floating_ips.client.FloatingIPsClient
:members:

.. autoclass:: hcloud.floating_ips.client.BoundFloatingIP
:members:

.. autoclass:: hcloud.floating_ips.domain.FloatingIP
:members:

.. autoclass:: hcloud.floating_ips.domain.CreateFloatingIPResponse
:members:
16 changes: 16 additions & 0 deletions docs/api.clients.images.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ImagesClient
==================


.. autoclass:: hcloud.images.client.ImagesClient
:members:

.. autoclass:: hcloud.images.client.BoundImage
:members:

.. autoclass:: hcloud.images.domain.Image
:members:

.. autoclass:: hcloud.images.domain.CreateImageResponse
:members:

13 changes: 13 additions & 0 deletions docs/api.clients.isos.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ISOsClient
==================


.. autoclass:: hcloud.isos.client.IsosClient
:members:

.. autoclass:: hcloud.isos.client.BoundIso
:members:

.. autoclass:: hcloud.isos.domain.Iso
:members:

13 changes: 13 additions & 0 deletions docs/api.clients.locations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
LocationsClient
==================


.. autoclass:: hcloud.locations.client.LocationsClient
:members:

.. autoclass:: hcloud.locations.client.BoundLocation
:members:

.. autoclass:: hcloud.locations.domain.Location
:members:

12 changes: 12 additions & 0 deletions docs/api.clients.server_types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ServerTypesClient
==================

.. autoclass:: hcloud.server_types.client.ServerTypesClient
:members:

.. autoclass:: hcloud.server_types.client.BoundServerType
:members:

.. autoclass:: hcloud.server_types.domain.ServerType
:members:

33 changes: 33 additions & 0 deletions docs/api.clients.servers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ServersClient
==================


.. autoclass:: hcloud.servers.client.ServersClient
:members:

.. autoclass:: hcloud.servers.client.BoundServer
:members:

.. autoclass:: hcloud.servers.domain.Server
:members:

.. autoclass:: hcloud.servers.domain.PublicNetwork
:members:

.. autoclass:: hcloud.servers.domain.IPv4Address
:members:

.. autoclass:: hcloud.servers.domain.IPv6Network
:members:

.. autoclass:: hcloud.servers.domain.CreateServerResponse
:members:

.. autoclass:: hcloud.servers.domain.ResetPasswordResponse
:members:

.. autoclass:: hcloud.servers.domain.EnableRescueResponse
:members:

.. autoclass:: hcloud.servers.domain.RequestConsoleResponse
:members:
Loading