2
2
Fork
You've already forked overpass-api-python-wrapper
2

add default user-agent? #194

Closed
opened 2026年04月27日 03:00:44 +02:00 by bradh · 3 comments
Contributor
Copy link

Given recent changes on Overpass API, should there be a default user agent?

headers={"Accept-Charset": "utf-8;q=0.7,*;q=0.7", 'User-Agent': 'overpass-api-python-wrapper 0.7' }

As an alternative, should overpass.API() have a required user_agent argument that gets appended to the default headers? That way, different library users would be distinguishable.

Happy to propose a change (PR), just wanted to get input on the preferred approach.

Given recent changes on Overpass API, should there be a default user agent? ``` headers={"Accept-Charset": "utf-8;q=0.7,*;q=0.7", 'User-Agent': 'overpass-api-python-wrapper 0.7' } ``` As an alternative, should `overpass.API()` have a required `user_agent` argument that gets appended to the default headers? That way, different library users would be distinguishable. Happy to propose a change (PR), just wanted to get input on the preferred approach.

We should have a required User-Agent.

I have this planned for the 1.0 release, but if you want to create a patch for 0.8.x, that's great too!

We should have a required `User-Agent`. I have this planned for the 1.0 release, but if you want to create a patch for 0.8.x, that's great too!
Author
Contributor
Copy link

I'll give that a try.

However I'm not sure which change you would prefer:

  • Option A: modify headers string to provide a default for the User-Agent
  • Option B: add a required argument to the API() method
  • (or, new variation, Option C): add a default to the headers and an optional argument to the API() method

Options A and C look easier to use, but Option B is less likely to result in all users being banned just because one user abused the service.

I'll give that a try. However I'm not sure which change you would prefer: - Option A: modify `headers` string to provide a default for the `User-Agent` - Option B: add a required argument to the `API()` method - (or, new variation, Option C): add a default to the `headers` and an optional argument to the `API()` method Options A and C look easier to use, but Option B is less likely to result in all users being banned just because one user abused the service.
Author
Contributor
Copy link

Ah, never mind. I've just seen the DESIGN document.

Ah, never mind. I've just seen the DESIGN document.
mvexel added this to the v1.0 project 2026年05月04日 01:36:46 +02:00
mvexel removed their assignment 2026年05月04日 01:36:57 +02:00
mvexel added this to the v1.0 milestone 2026年05月04日 01:37:07 +02:00
Sign in to join this conversation.
No Branch/Tag specified
main
tutorial/d1-httpx-nvim
0.8.x
dev-contributor-tooling
1.0-dev
dev
feature/api-modernization
maintenance/base-0.8
maintenance/geojson-fixtures
archive/async-models
maintenance/endpoint-guard
maintenance/live-query-tool
maintenance/modernize-plan
archive/dev-prebaseline-20260502
archive/modernize
archive/chore-tests
chore/poetry
archive/readme
v0.8.2
v0.8.1
v0.8.0
v0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.7
0.5.6
0.5.5
0.4.0
0.1.0
0.0.2
0.0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mvexel/overpass-api-python-wrapper#194
Reference in a new issue
mvexel/overpass-api-python-wrapper
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?