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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9333af867ff177ce906e68d34125681404d8e8d91aa3f083cc0fa6f46b02c306
|
|
| MD5 |
075d09c0a78da353cf65407a93af2bd7
|
|
| BLAKE2b-256 |
eb6916288628fad9a19e9dc9c60da6baff170787de4d8c3e6952b7defc661687
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fa18494256cf4b196a0d175043bf75744c979c17e475e0f6808f99254fe5bc5
|
|
| MD5 |
0b6029511ae7016dcc2f6270f3356df5
|
|
| BLAKE2b-256 |
dd0f0f9fd479f108b0c48d801d9b024840d9909adb6802acce70b12757a06fb9
|