$npx skillfedfor your agent

locate

Locate the file location of your current running script.

With conditionsPyPI Software DevelopmentReleased Dec 20222.3M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — locate-1.1.1-py3-none-any.whl
v1.1.1 · released 2022-12-15 · Python >=3.4

Yes, if you need a lightweight way to locate your script and manage relative imports without external dependencies. No, if you require ongoing maintenance or active support—the package is abandoned and will not receive updates. The unclear license is a secondary concern but worth clarifying before use in proprietary code.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with no runtime dependencies.
  • However, the package is abandoned—last release was 2022-12-15 and last commit 2023-06-01—so it will not receive bug fixes or maintenance.

License · maintenance · safety

(unclear) — License treatment is unclear; the classifier lists 'Other/Proprietary License' but no SPDX identifier or raw license text is provided, making the actual terms of use ambiguous.

last release 2022-12-15 (1338 days) · last repo commit 2023-06-01 · 3 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,257,106 downloads/mo, #3,184 on PyPI

Verify before relying

import locate

# Get the directory of the current script
script_dir = locate.this_dir()

# Temporarily add a relative path to sys.path
with locate.prepend_sys_path("../modules"):
    pass
  • Whether the 'Other/Proprietary License' classifier reflects actual licensing terms or is a placeholder
  • Whether the package works correctly with Python versions beyond 3.4 despite being abandoned since mid-2023
Same gist for agents: .md · .json

What it is and what it does

Locate is a small utility library that solves the problem of finding the directory of the currently running Python script and dynamically modifying the import search path relative to that location. It provides three main functions: `this_dir()` returns the directory of the executing script (or the current working directory in interactive sessions), while `append_sys_path()` and `prepend_sys_path()` allow you to add directories relative to the script location to Python's import path, either permanently or temporarily via context manager. The context manager implementation uses a tagged string subclass to safely track and remove insertions, so nested context managers won't corrupt the restoration.

The package targets developers who organize their projects with custom modules stored alongside scripts and want those imports to work consistently whether the script runs directly, from a notebook, or from a REPL. It's inspired by Julia's approach to directory resolution. Since the package has no runtime dependencies and installs as a pure Python wheel, it has minimal friction—but it has been abandoned since mid-2023, so no further updates or fixes should be expected.

Use it for

  • Load custom modules stored in a sibling directory without modifying PYTHONPATH or installing them as packages
  • Write scripts that work identically whether run from the command line, Jupyter notebook, or interactive shell
  • Temporarily import from a local directory within a specific code block using a context manager

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need a lightweight way to locate your script and manage relative imports without external dependencies.

No, if you require ongoing maintenance or active support—the package is abandoned and will not receive updates. The unclear license is a secondary concern but worth clarifying before use in proprietary code.

Install

locate on PyPI

Before you install

Low friction install with no runtime dependencies. However, the package is abandoned—last release was 2022-12-15 and last commit 2023-06-01—so it will not receive bug fixes or maintenance.

License in practice

License treatment is unclear; the classifier lists 'Other/Proprietary License' but no SPDX identifier or raw license text is provided, making the actual terms of use ambiguous.

Quickstart

import locate

# Get the directory of the current script
script_dir = locate.this_dir()

# Temporarily add a relative path to sys.path
with locate.prepend_sys_path("../modules"):
    pass

Verify before relying

  • Whether the 'Other/Proprietary License' classifier reflects actual licensing terms or is a placeholder
  • Whether the package works correctly with Python versions beyond 3.4 despite being abandoned since mid-2023

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.4
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAbandoned 1,338 days since the last release
Last repo commit
First released
Downloads2,257,106 / month, #3,184 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: Other/Proprietary LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: locate-1.1.1-py3-none-any.whl

Tags

Capabilities
get current script directoryrelative path importssys.path manipulationfind running file locationdynamic module loading
Topics
import-managementpath-utilities

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “get current script directory”

  • locateProvides utilities to locate the current Python file's directory and…
  • pyrootutilsFinds your project root directory and configures Python paths,…
  • pyprojrootFinds your project's root directory and provides a `here()` function…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also emport · rootpath · conda-inject · findspark · bazel-runfiles · pyinvoke · pyprojroot · virtualenv-clone · editables · codefind