Discover advertised Onion-Location for given URLs https://pypi.org/project/onion-location/
Find a file
2024-08-17 13:48:26 +02:00
LICENSES Add Python .gitignore 2024-08-01 12:53:26 +02:00
.editorconfig Add EditorConfig configuration 2024-08-01 13:12:31 +02:00
.gitignore gitignore: Nuclear option ignoring PyCharm files 2024-08-01 12:56:36 +02:00
.pre-commit-config.yaml ci(pre-commit): Add pre-commit-hooks hooks 2024-08-17 13:48:26 +02:00
onion_location.py chore(pre-commit): update ruff hook 2024-08-04 08:18:34 +02:00
pyproject.toml Bumping status to Alpha 2024-08-03 01:57:30 +02:00
README.rst docs(README): Add “Contributing” section 2024-08-17 13:23:04 +02:00
REUSE.toml chore: Convert REUSE DEP5 file to REUSE.toml 2024-08-17 12:14:34 +02:00

Onion-Location

Python library for discovering Onion-Location HTTP headers.

Usage

>>> from onion_location import get_onion_location >>> get_onion_location("https://www.torproject.org/") 'http://2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion/index.html'

Contributing

TL;DR

Behave like a decent person, install pre-commit, run pre-commit install in the project root, and take heed of any errors you get when trying to commit.

General

The project aims to follow best practices for development. Be sure to behave like a decent person in all interactions related to this project.

We follow a number of standards and best-practices to hopefully ease on-boarding of contributors, incl. our future selves. This includes utilising pre-commit to automate checking a bunch of things before code even gets committed to the repository. It is highly recommended that anyone wanting to contribute enables this.

Relevant standards for code style and commit messages are specified in those sections.

REUSE

The REUSE Specification aims to "make licensing easy for humans and machines alike." This is unlikely something you will need to worry about, but in the case where you do wish to add code from elsewhere, be sure to keep this in mind.

Code style

This project generally aims to adhere to official Python project style guidelines, such as PEP8. More specifically, it uses the Black code style as implemented via Ruff.

Commit style

Keep commits atomic and use Conventional Commits with good commit messages.

License

Onion-Location is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Some parts of the repository may be distributed under different terms. This project adheres to the REUSE Specification version 3.2 and any files or code deviating from the general license of the project will be annotated as such.