Skip to content

Commit 2909787

Browse files
committed
this should fix all tech and usage docs
1 parent 7e59087 commit 2909787

File tree

6 files changed

+237
-834
lines changed

6 files changed

+237
-834
lines changed

sphinx/index.rst

Lines changed: 126 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ What APIs can I access with PyOWM?
2828

2929
With PyOWM you can interact programmatically with the following OpenWeatherMap web APIs:
3030

31-
- **Weather API v2.5**, offering
31+
- **Weather API v2.5** + **OneCall API**, offering
3232
+ current weather data
3333
+ weather forecasts
3434
+ weather history
@@ -38,190 +38,219 @@ With PyOWM you can interact programmatically with the following OpenWeatherMap w
3838
- **Stations API v3.0**, allowing to create and manage meteostation and publish local weather measurements
3939
- **Weather Alerts API v3.0**, allowing to set triggers on weather conditions and areas and poll for spawned alerts
4040

41-
And You can also get **image tiles** for several map layers provided by OWM
41+
And you can also get **image tiles** for several map layers provided by OWM
4242

4343

4444
The documentation of OWM APIs can be found on the OWM Website_
4545

4646
.. _Website: https://openweathermap.org/api
4747

4848

49-
Important note
50-
--------------
49+
Used to work with PyOWM v2?
50+
---------------------------
5151

5252
PyOWM v3 is a brand new branch of the library and therefore differs from PyOWM v2 branch.
5353
This means that **v3 offers no retrocompatibility with v2: this might result in your code breaking** if
5454
it uses PyOWM v2 and you uncarefully update!
55+
Moreover, PyOWM v3 runs on Python 3 only.
5556

56-
Moreover, PyOWM v3 only runs on Python 2 while PyOWM v2 supports both Python 2 and 3 (until January, 1st 2020)
57+
PyOWM v2 will follow this Timeline_
5758

58-
Please take a look here, you can get full detail and migration guidelines
59+
It is highly recommended that you upgrade your PyOWM v2 dependency to PyOWM v3: follow this guide for Migrating_
5960

60-
Maintenance Streams Timeline
61-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62-
.. toctree::
63-
:maxdepth: 1
6461

65-
v3/maintenance-streams-timelines
66-
v3/migration-guide-pyowm-v2-to-v3
62+
.. _Timeline: v3/maintenance-streams-timelines.html
63+
.. _Migrating: v3/migration-guide-pyowm-v2-to-v3.html
6764

6865

6966
Supported environments and Python versions
7067
------------------------------------------
7168

7269
PyOWM runs on Windows, Linux and MacOS.
73-
7470
PyOWM runs on Python 3.7+
7571

7672

77-
Installation
78-
------------
79-
80-
pip
81-
~~~
82-
83-
The easiest method of all:
84-
85-
.. code::
86-
87-
$ pip install pyowm
88-
89-
If you already have PyOWM 2.x installed and want to upgrade to safely update it to the latest 2.x release just run:
90-
91-
.. code::
92-
93-
$ pip install --upgrade pyowm>=2.0,<3.0
94-
95-
96-
Get the lastest development version
97-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98-
99-
You can install the development trunk with _pip_:
100-
101-
.. code::
102-
103-
$ pip install git+https://github.com/csparpa/pyowm.git@develop
104-
73+
Usage and Technical Documentation
74+
---------------------------------
10575

106-
but be aware that it might not be stable!
107-
108-
setuptools
109-
~~~~~~~~~~
76+
PyOWM v3 documentation
77+
~~~~~~~~~~~~~~~~~~~~~~
11078

111-
You can install from source using _setuptools_: either download a release from GitHub or just take the latest main branch), then:
112-
113-
.. code::
114-
115-
$ unzip <zip archive> # or tar -xzf <tar.gz archive>
116-
$ cd pyowm-x.y.z
117-
$ python setup.py install
118-
119-
The .egg will be installed into the system-dependent Python libraries folder
120-
121-
122-
Distribution packages
123-
~~~~~~~~~~~~~~~~~~~~~
79+
Quick code recipes (work in progress)
80+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81+
.. toctree::
82+
:maxdepth: 1
12483

125-
On Windows you have EXE installers
84+
v3/code-recipes
12685

127-
On ArchLinux you can use the Yaourt package manager, run:
86+
PyOWM v3 software API documentation
87+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88+
This is the Python API documentation of PyOWM:
12889

129-
.. code::
90+
.. toctree::
91+
:maxdepth: 1
13092

131-
Yaourt -S python2-owm # Python 2.7 (https://aur.archlinux.org/packages/python-owm)
132-
Yaourt -S python-owm # Python 3.x (https://aur.archlinux.org/packages/python2-owm)
93+
pyowm
13394

134-
On OpenSuse you can use with YaST/Zypper package manager, run:
95+
Description of PyOWM configuration
96+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97+
.. toctree::
98+
:maxdepth: 1
13599

136-
.. code::
100+
v3/pyowm-configuration-description
137101

138-
zypper install python-pyowm
139102

140-
Quick code recipes
141-
------------------
103+
Global PyOWM instantiation documentation
104+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142105
.. toctree::
143106
:maxdepth: 1
144107

145-
v3/code-recipes
108+
v3/global-pyowm-usage-examples
146109

147110

148-
Legacy PyOWM v2 usage documentation
149-
-----------------------------------
111+
City ID registry documentation
112+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113+
.. toctree::
114+
:maxdepth: 1
150115

151-
Here are some usage examples for the different OWM APIs: these examples and guides refer to PyOWM library
152-
versions belonging to the old 2.x stream
116+
v3/city-id-registry-examples
153117

154118

155119
Weather API examples
156-
~~~~~~~~~~~~~~~~~~~~
120+
^^^^^^^^^^^^^^^^^^^^
157121
.. toctree::
158122
:maxdepth: 1
159123

160-
usage-examples-v2/weather-api-usage-examples
161-
usage-examples-v2/weather-api-object-model
124+
v3/weather-api-usage-examples
162125

163126
Agro API examples
164-
~~~~~~~~~~~~~~~~~
127+
^^^^^^^^^^^^^^^^^
165128

166129
.. toctree::
167130
:maxdepth: 1
168131

169-
usage-examples-v2/agro-api-usage-examples
132+
v3/agro-api-usage-examples
170133

171134

172135
UV API examples
173-
~~~~~~~~~~~~~~~
136+
^^^^^^^^^^^^^^^
174137
.. toctree::
175138
:maxdepth: 1
176139

177-
usage-examples-v2/uv-api-usage-examples
140+
v3/uv-api-usage-examples
178141

179142

180143
Air Pollution API examples
181-
~~~~~~~~~~~~~~~~~~~~~~~~~~
144+
^^^^^^^^^^^^^^^^^^^^^^^^^^
182145

183146
.. toctree::
184147
:maxdepth: 1
185148

186-
usage-examples-v2/air-pollution-api-usage-examples
149+
v3/air-pollution-api-usage-examples
187150

188151
Stations API examples
189-
~~~~~~~~~~~~~~~~~~~~~
152+
^^^^^^^^^^^^^^^^^^^^^
190153
.. toctree::
191154
:maxdepth: 1
192155

193-
usage-examples-v2/stations-api-usage-examples
156+
v3/stations-api-usage-examples
194157

195158
Alerts API examples
196-
~~~~~~~~~~~~~~~~~~~
159+
^^^^^^^^^^^^^^^^^^^
197160
.. toctree::
198161
:maxdepth: 1
199162

200-
usage-examples-v2/alerts-api-usage-examples
163+
v3/alerts-api-usage-examples
201164

202165
Map tiles client examples
203-
~~~~~~~~~~~~~~~~~~~~~~~~~
166+
^^^^^^^^^^^^^^^^^^^^^^^^^
204167
.. toctree::
205168
:maxdepth: 1
206169

207-
usage-examples-v2/map-tiles-client-examples.md
170+
v3/map-tiles-client-usage-examples.md
208171

172+
PyOWM Exceptions
173+
^^^^^^^^^^^^^^^^
174+
.. toctree::
175+
:maxdepth: 1
209176

210-
PyOWM v3 usage documentation
211-
----------------------------
212-
Coming soon!
177+
v3/exceptions.md
213178

179+
Utility functions examples
180+
^^^^^^^^^^^^^^^^^^^^^^^^^^
181+
.. toctree::
182+
:maxdepth: 1
214183

215-
PyOWM software API documentation
216-
--------------------------------
184+
v3/utilities-usage-examples.md
217185

218-
This is the Python API documentation of PyOWM:
219186

220-
.. toctree::
221-
:maxdepth: 1
187+
Legacy PyOWM v2 documentation
188+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189+
Please refer to historical archives on Readthedocs or the GitHub repo for this
190+
191+
192+
Installation
193+
------------
194+
195+
pip
196+
~~~
197+
198+
The easiest method of all:
199+
200+
.. code::
201+
202+
$ pip install pyowm
203+
204+
If you already have PyOWM 2.x installed and want to upgrade to safely update it to the latest 2.x release just run:
205+
206+
.. code::
207+
208+
$ pip install --upgrade pyowm>=2.0,<3.0
209+
210+
211+
Get the lastest development version
212+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213+
214+
You can install the development trunk with _pip_:
215+
216+
.. code::
217+
218+
$ pip install git+https://github.com/csparpa/pyowm.git@develop
219+
220+
221+
but be aware that it might not be stable!
222+
223+
setuptools
224+
~~~~~~~~~~
225+
226+
You can install from source using _setuptools_: either download a release from GitHub or just take the latest main branch), then:
227+
228+
.. code::
229+
230+
$ unzip <zip archive> # or tar -xzf <tar.gz archive>
231+
$ cd pyowm-x.y.z
232+
$ python setup.py install
233+
234+
The .egg will be installed into the system-dependent Python libraries folder
222235

223-
pyowm
224236

237+
Distribution packages
238+
~~~~~~~~~~~~~~~~~~~~~
239+
240+
On Windows you have EXE installers
241+
242+
On ArchLinux you can use the Yaourt package manager, run:
243+
244+
.. code::
245+
246+
Yaourt -S python2-owm # Python 2.7 (https://aur.archlinux.org/packages/python-owm)
247+
Yaourt -S python-owm # Python 3.x (https://aur.archlinux.org/packages/python2-owm)
248+
249+
On OpenSuse you can use with YaST/Zypper package manager, run:
250+
251+
.. code::
252+
253+
zypper install python-pyowm
225254
226255
227256
How to contribute

0 commit comments

Comments
 (0)