Skip to main content

Search hidden services on the Tor network.

Project description

PyAhmia Logo

PyAhmia uses Ahmia.fi to search for hidden services on the Tor network
that match with a specified query, without an explicit requirement for Tor.

PyPI - Version PyPI - Downloads Code Size Release Date Build Status License

Features

  • Search Ahmia.fi from the command line
  • Export results to CSV
  • Enable/Disable routing requests through Tor
  • Return results in a clean readable format
  • Response caching for faster repeated searches
  • Configurable result limits and request timeout

Installation

PyAhmia is available on PyPI and can be installed like so:

pip install pyahmia

This will install ahmia and pyahmia as commands.

Usage

To start searching, you can call ahmia (or pyahmia) with the specified search query.

example:

ahmia QUERY

Routing Traffic Through Tor (Optional)

PyAhmia works without Tor, but you can enable routing traffic through Tor if you want.

When this is enabled, it will use Ahmia's darknet url instead of the clearnet variant.

To enable routing through Tor, you can call ahmia with the -t, --use-tor flag. This assumes the tor service is running in the background, otherwise, the command will fail before you can say "hidden wiki".

If Tor is not installed, you can check out the installation scripts located in pyahmia/scripts.

example:

ahmia QUERY --use-tor

Exporting Output

PyAhmia only supports exporting data to csv files (for now), and in order to export, you'll need to specify the -e, --export flag. This will export your search results to a file named after your search query.

example:

ahmia QUERY --export

Filtering Results by Time Period

Results can be filtered by 3 time periods (day, week, month). By default, results will be taken from all time periods ( all). You can change this by using the -p, --period option, and pass the time period you want to get results from.

example:

ahmia QUERY --period week

Limiting Results

By default, PyAhmia displays up to 100 results. You can change this with the -l, --limit option.

example:

ahmia QUERY --limit 50

To show all results regardless of the limit, use the -a, --all flag.

example:

ahmia QUERY --all

Caching

PyAhmia caches responses by default to reduce redundant requests. To disable caching, use the --no-cache flag.

example:

ahmia QUERY --no-cache

Request Timeout

You can set a custom timeout (in seconds) for requests using the --timeout option. The default is 10 seconds.

example:

ahmia QUERY --timeout 30

In Conclusion

Don't send too many requests with pyahmia. Be nice to the owners of Ahmia.fi :)

Contributing

Contributions are welcome! If you’d like to improve PyAhmia, fix a bug, or add a feature:

  1. Fork the repository
  2. Create a new branch for your changes
  3. Commit and push your changes
  4. Open a pull request

Please keep PRs focused and provide a clear description of the problem being solved. Bug reports and feature requests are also appreciated, just open an issue.

License

This project is licensed under the MIT License, see the LICENSE file for details.

[!Note] PyAhmia is not in any way affiliated with Ahmia.fi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyahmia-0.11.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyahmia-0.11.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyahmia-0.11.2.tar.gz.

File metadata

  • Download URL: pyahmia-0.11.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyahmia-0.11.2.tar.gz
Algorithm Hash digest
SHA256 04fdff0ef347d0319434139fa25a945d4655a674b77c8414a487aba3fffce574
MD5 fd139109d74839a76d2ea63f3bdbb7e9
BLAKE2b-256 2fa8a42205f2c7b16570d26251dc476bcda263e1653f846d368217405168f013

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyahmia-0.11.2.tar.gz:

Publisher: python-publish.yml on rly0nheart/pyahmia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyahmia-0.11.2-py3-none-any.whl.

File metadata

  • Download URL: pyahmia-0.11.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyahmia-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f56ecdb92cb64ac0393b3e07e0d40b6bdb5df6d77fef99a7bb89f59e5aa28fce
MD5 c1c6963e25056d4c8990991efb5f9f04
BLAKE2b-256 ef71ad0a62190516818adb6d05c978bc9b6274edfe183645d1eab05c4ae02acf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyahmia-0.11.2-py3-none-any.whl:

Publisher: python-publish.yml on rly0nheart/pyahmia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page