Skip to main content

Python package that replicates the R package called 'here'.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Here

Python package that replicates the R package called "here".

Overview

The here package provides utility functions to determine the root directory of your project and easily resolve paths relative to it. This is particularly useful for managing file paths when calling the code from shells that cd to other directories before executing the script.

Features

  • Determine the root directory of the current file working directory.
  • Resolve paths relative to the root directory.
  • Supports usage in Jupyter notebooks, .py scripts, and interactive Python shells.

Installation

You can install the package using pip:

pip install here

Example Usage

# Get the file working directory
file_working_directory = get_file_working_directory()
print(f"File working directory: {file_working_directory}")

# Resolve a relative path using the here function
resolved_path = here("data/output")
print(f"Resolved path: {resolved_path}")

It works on both .py and .ipynb files!

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

here_here-1.1.11.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

here_here-1.1.11-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file here_here-1.1.11.tar.gz.

File metadata

  • Download URL: here_here-1.1.11.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for here_here-1.1.11.tar.gz
Algorithm Hash digest
SHA256 da2772527d1f637e831f365fc86f712cdaf3ab3c99fb91248f7694779c0ff2d9
MD5 3ca92dae6e74b9f2ebf6e65b2f6c4499
BLAKE2b-256 34c871f876781ef457cbbbbd1344ec54c408a8ae626b2d56be9eee94a14d92c2

See more details on using hashes here.

File details

Details for the file here_here-1.1.11-py3-none-any.whl.

File metadata

  • Download URL: here_here-1.1.11-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for here_here-1.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 57eba8ef75db46ab931835a2461deeb79831978cebc0d28f68e6b627f4273e7c
MD5 92fc84a4b8e1756cef7df4a2901f97a8
BLAKE2b-256 76b496e89a753f5032e07e9c750d82701d7113dd8ddb9cf0da33991aedb2ebf1

See more details on using hashes here.

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