You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4
4
5
5
## [Unreleased]
6
6
7
+
## [4.3.0] - 2025-01-21
8
+
### Added
9
+
- New `ConnectionApiError` when a connection or network error occurs (see issue #176, thanks [Mateusz Konieczny](https://github.com/matkoniecz))
10
+
-
11
+
### Changed
12
+
- Use the pattern `raise XYError from e` to explicitly add the original exceptions as the cause for a new (wrapped) exception.
13
+
14
+
### Removed
15
+
- Remove u string prefix (see PR #180, thanks [Boris Verkhovskiy](https://github.com/verhovsky))
16
+
7
17
## [4.2.0] - 2024-08-08
8
18
### Added
9
19
- Add a new `timeout` parameter to `OsmApi` which allows to set a timeout in seconds (default is 30s) for the API requests (see issue #170, thanks [Mateusz Konieczny](https://github.com/matkoniecz))
@@ -357,7 +367,8 @@ Miroslav Šedivý
357
367
-`Fixed` for any bug fixes.
358
368
-`Security` to invite users to upgrade in case of vulnerabilities.
@@ -26,7 +26,7 @@ The build the documentation locally, you can use
26
26
make docs
27
27
28
28
This project uses GitHub Pages to publish its documentation.
29
-
To update the online documentation, you need to re-generate the documentation with the above command and update the `master` branch of this repository.
29
+
To update the online documentation, you need to re-generate the documentation with the above command and update the `main` branch of this repository.
30
30
31
31
## Examples
32
32
@@ -40,32 +40,21 @@ Check the [examples directory](https://github.com/metaodi/osmapi/tree/develop/ex
40
40
>>>import osmapi
41
41
>>> api = osmapi.OsmApi()
42
42
>>>print(api.NodeGet(123))
43
-
{u'changeset': 532907, u'uid': 14298,
44
-
u'timestamp': u'2007-09-29T09:19:17Z',
45
-
u'lon': 10.790009299999999, u'visible': True,
46
-
u'version': 1, u'user': u'Mede',
47
-
u'lat': 59.9503044, u'tag': {}, u'id': 123}
43
+
{'changeset': 532907, 'uid': 14298,
44
+
'timestamp': '2007-09-29T09:19:17Z',
45
+
'lon': 10.790009299999999, 'visible': True,
46
+
'version': 1, 'user': 'Mede',
47
+
'lat': 59.9503044, 'tag': {}, 'id': 123}
48
48
```
49
49
50
-
### Constructor
51
-
52
-
```python
53
-
import osmapi
54
-
api = osmapi.OsmApi(api="https://api06.dev.openstreetmap.org", username="you", password="***")
55
-
api = osmapi.OsmApi(username="you", passwordfile="/etc/mypasswords")
56
-
api = osmapi.OsmApi(passwordfile="/etc/mypasswords") # if only the passwordfile is specified, the credentials on the first line of the file will be used
57
-
```
58
-
59
-
Note: Each line in the password file should have the format _user:password_
60
-
61
50
### Write to OpenStreetMap
62
51
63
52
```python
64
53
>>>import osmapi
65
-
>>> api = osmapi.OsmApi(api="https://api06.dev.openstreetmap.org", username=u"metaodi", password=u"*******")
66
-
>>> api.ChangesetCreate({u"comment": u"My first test"})
@@ -107,6 +96,24 @@ with api.Changeset({"comment": "My first test"}) as changeset_id:
107
96
An alternative way using the `requests-oauthlib` library can be found
108
97
[in the examples](https://github.com/metaodi/osmapi/blob/develop/examples/oauth2.py).
109
98
99
+
100
+
### User agent / credit for application
101
+
102
+
To credit the application that supplies changes to OSM, an `appid` can be provided.
103
+
This is a string identifying the application.
104
+
If this is omitted "osmapi" is used.
105
+
106
+
```python
107
+
api = osmapi.OsmApi(
108
+
api="https://api06.dev.openstreetmap.org",
109
+
appid="MyOSM Script"
110
+
)
111
+
```
112
+
113
+
If then changesets are made using this osmapi instance, they get a tag `created_by` with the following content: `MyOSM Script (osmapi/<version>)`
114
+
115
+
[Example changeset of `Kort` using osmapi](https://www.openstreetmap.org/changeset/55197785)
116
+
110
117
## Note about imports / automated edits
111
118
112
119
Scripted imports and automated edits should only be carried out by those with experience and understanding of the way the OpenStreetMap community creates maps, and only with careful **planning** and **consultation** with the local community.
@@ -140,8 +147,8 @@ To create a new release, follow these steps (please respect [Semantic Versioning
140
147
1. Adapt the version number in `osmapi/__init__.py`
141
148
1. Update the CHANGELOG with the version
142
149
1. Re-build the documentation (`make docs`)
143
-
1. Create a pull request to merge develop into master (make sure the tests pass!)
144
-
1. Create a [new release/tag on GitHub](https://github.com/metaodi/osmapi/releases) (on the master branch)
150
+
1. Create a [pull request to merge develop into main](https://github.com/metaodi/osmapi/compare/main...develop) (make sure the tests pass!)
151
+
1. Create a [new release/tag on GitHub](https://github.com/metaodi/osmapi/releases) (on the main branch)
145
152
1. The [publication on PyPI](https://pypi.python.org/pypi/osmapi) happens via [GitHub Actions](https://github.com/metaodi/osmapi/actions/workflows/publish_python.yml) on every tagged commit
0 commit comments