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.12.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.12-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: here_here-1.1.12.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.12.tar.gz
Algorithm Hash digest
SHA256 e9ae97e9741cb7e331acabec6386eba17d4af35d1f5914c6a9e80ef2a25aeb3f
MD5 7958fc0dde178b79b00bc0df9003595d
BLAKE2b-256 011ceaf55ac9102ee024dfe6d672898288c3b21c07897d4f9743bb5ae035ca11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: here_here-1.1.12-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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 fd3cd927c55632f89bfd968c4dcf70c23c70f30f67a93aa77652d640e3e6c45c
MD5 ad87bd7206049b17e727c4bd7d764370
BLAKE2b-256 9a51cd6695dfdc1e1c2bcbee1d0e5213ceca34474a90f869258407518fb45710

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