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.14.tar.gz (3.0 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.14-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: here_here-1.1.14.tar.gz
  • Upload date:
  • Size: 3.0 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.14.tar.gz
Algorithm Hash digest
SHA256 9333af867ff177ce906e68d34125681404d8e8d91aa3f083cc0fa6f46b02c306
MD5 075d09c0a78da353cf65407a93af2bd7
BLAKE2b-256 eb6916288628fad9a19e9dc9c60da6baff170787de4d8c3e6952b7defc661687

See more details on using hashes here.

File details

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

File metadata

  • Download URL: here_here-1.1.14-py3-none-any.whl
  • Upload date:
  • Size: 2.7 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 4fa18494256cf4b196a0d175043bf75744c979c17e475e0f6808f99254fe5bc5
MD5 0b6029511ae7016dcc2f6270f3356df5
BLAKE2b-256 dd0f0f9fd479f108b0c48d801d9b024840d9909adb6802acce70b12757a06fb9

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