autoset-pwd


Nameautoset-pwd JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/libranet/autoset-pwd
SummaryAutomatically set $PWD as an environment-variable.
upload_time2023-10-05 08:17:40
maintainerWouter Vanden Hove
docs_urlNone
authorWouter Vanden Hove
requires_python>=3.8.0
licenseMIT
keywords entrypoints sitecustomize pwd
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Testing](https://img.shields.io/github/actions/workflow/status/libranet/autoset-pwd/testing.yaml?branch=main&longCache=true&style=flat-square&label=tests&logo=GitHub%20Actions&logoColor=fff")](https://github.com/libranet/autoset-pwd/actions/workflows/testing.yaml)
[![Linting](https://img.shields.io/github/actions/workflow/status/libranet/autoset-pwd/linting.yaml?branch=main&longCache=true&style=flat-square&label=linting&logo=GitHub%20Actions&logoColor=fff")](https://github.com/libranet/autoset-pwd/actions/workflows/linting.yaml)
[![Read the Docs](https://readthedocs.org/projects/autoset-pwd/badge/?version=latest)](https://autoset-pwd.readthedocs.io/en/latest/)
[![Codecov](https://codecov.io/gh/libranet/autoset-pwd/branch/main/graph/badge.svg?token=AFP6UMXEN5)](https://codecov.io/gh/libranet/autoset-pwd)
[![PyPi Package](https://img.shields.io/pypi/v/autoset-pwd?color=%2334D058&label=pypi%20package)](https://pypi.org/project/autoset-pwd/)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/autoset-pwd/blob/main/docs/license.md)



https://app.codecov.io/gh/libranet/autoset-pwd
# autoset-pwd

Automatically add the $PWD-directory to the ``PWD_DIR``-environment variable
via ``sitecustomize``-entrypoint.

## How does it work?

We register the ``autoset_pdw.entrypoint()``-function to the ``sitecustomize``-module that is installed by the
[sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)-package.

The registered function will look up ``os.getcwd()`` in your current working directory and
set it as ``PWD_DIR``-environment variable.


## Installation

Install via pip:

```bash
> bin/pip install autoset-pwd
```

Or add to your poetry-based project:

```bash
> poetry add autoset-pwd
```


## Validate & Usage
After installing this package there is nothing left to do explicitly.
We can validate that the plugin work correctly by starting a python-session and checking the ``PWD_DIR``-environment-variable:

```bash
> bin/python
```

```python
>>> import os
>>> print(os.getcwd())
    "<path-to-your-current-dir>"
```
>>> print(os.getenv("PwD_DIR"))
    "<path-to-your-current-dir>"


## Registered sitecustomize-entrypoint

The ``autoset_pwd``-function is registered as a ``sitecustomize``-entrypoint in our pyproject.toml_:

``` toml
    [tool.poetry.plugins]
    [tool.poetry.plugins."sitecustomize"]
    autoset_pwd = "autoset_pwd:entrypoint"
```

Sitecustomize and all its registered entrypoints will be executed at the start of *every* python-process.
For more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)


## Compatibility

 [![Python Version](https://img.shields.io/pypi/pyversions/autoset-pwd?:alt:PyPI-PythonVersion)](https://pypi.org/project/autoset-pwd/)
 [![PyPI - Implementation](https://img.shields.io/pypi/implementation/autoset-pwd?:alt:PyPI-Implementation)](https://pypi.org/project/autoset-pwd/)

``autoset-pwd``  works on Python 3.8+, including PyPy3. Tested until Python 3.11,


## Notable dependencies

- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/libranet/autoset-pwd",
    "name": "autoset-pwd",
    "maintainer": "Wouter Vanden Hove",
    "docs_url": null,
    "requires_python": ">=3.8.0",
    "maintainer_email": "wouter@libranet.eu",
    "keywords": "entrypoints,sitecustomize,pwd",
    "author": "Wouter Vanden Hove",
    "author_email": "wouter@libranet.eu",
    "download_url": "https://files.pythonhosted.org/packages/44/38/c77f7acce819d24e92892e1cb86f80beb541eaaa50ea13a874a1186d368d/autoset_pwd-0.1.tar.gz",
    "platform": null,
    "description": "[![Testing](https://img.shields.io/github/actions/workflow/status/libranet/autoset-pwd/testing.yaml?branch=main&longCache=true&style=flat-square&label=tests&logo=GitHub%20Actions&logoColor=fff\")](https://github.com/libranet/autoset-pwd/actions/workflows/testing.yaml)\n[![Linting](https://img.shields.io/github/actions/workflow/status/libranet/autoset-pwd/linting.yaml?branch=main&longCache=true&style=flat-square&label=linting&logo=GitHub%20Actions&logoColor=fff\")](https://github.com/libranet/autoset-pwd/actions/workflows/linting.yaml)\n[![Read the Docs](https://readthedocs.org/projects/autoset-pwd/badge/?version=latest)](https://autoset-pwd.readthedocs.io/en/latest/)\n[![Codecov](https://codecov.io/gh/libranet/autoset-pwd/branch/main/graph/badge.svg?token=AFP6UMXEN5)](https://codecov.io/gh/libranet/autoset-pwd)\n[![PyPi Package](https://img.shields.io/pypi/v/autoset-pwd?color=%2334D058&label=pypi%20package)](https://pypi.org/project/autoset-pwd/)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/autoset-pwd/blob/main/docs/license.md)\n\n\n\nhttps://app.codecov.io/gh/libranet/autoset-pwd\n# autoset-pwd\n\nAutomatically add the $PWD-directory to the ``PWD_DIR``-environment variable\nvia ``sitecustomize``-entrypoint.\n\n## How does it work?\n\nWe register the ``autoset_pdw.entrypoint()``-function to the ``sitecustomize``-module that is installed by the\n[sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)-package.\n\nThe registered function will look up ``os.getcwd()`` in your current working directory and\nset it as ``PWD_DIR``-environment variable.\n\n\n## Installation\n\nInstall via pip:\n\n```bash\n> bin/pip install autoset-pwd\n```\n\nOr add to your poetry-based project:\n\n```bash\n> poetry add autoset-pwd\n```\n\n\n## Validate & Usage\nAfter installing this package there is nothing left to do explicitly.\nWe can validate that the plugin work correctly by starting a python-session and checking the ``PWD_DIR``-environment-variable:\n\n```bash\n> bin/python\n```\n\n```python\n>>> import os\n>>> print(os.getcwd())\n    \"<path-to-your-current-dir>\"\n```\n>>> print(os.getenv(\"PwD_DIR\"))\n    \"<path-to-your-current-dir>\"\n\n\n## Registered sitecustomize-entrypoint\n\nThe ``autoset_pwd``-function is registered as a ``sitecustomize``-entrypoint in our pyproject.toml_:\n\n``` toml\n    [tool.poetry.plugins]\n    [tool.poetry.plugins.\"sitecustomize\"]\n    autoset_pwd = \"autoset_pwd:entrypoint\"\n```\n\nSitecustomize and all its registered entrypoints will be executed at the start of *every* python-process.\nFor more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)\n\n\n## Compatibility\n\n [![Python Version](https://img.shields.io/pypi/pyversions/autoset-pwd?:alt:PyPI-PythonVersion)](https://pypi.org/project/autoset-pwd/)\n [![PyPI - Implementation](https://img.shields.io/pypi/implementation/autoset-pwd?:alt:PyPI-Implementation)](https://pypi.org/project/autoset-pwd/)\n\n``autoset-pwd``  works on Python 3.8+, including PyPy3. Tested until Python 3.11,\n\n\n## Notable dependencies\n\n- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automatically set $PWD as an environment-variable.",
    "version": "0.1",
    "project_urls": {
        "Changelog": "https://github.com/libranet/autoset-pwd/blob/main/docs/changes.md",
        "Documentation": "https://autoset-pwd.readthedocs.io",
        "Homepage": "https://github.com/libranet/autoset-pwd",
        "Issues": "https://github.com/libranet/autoset-pwd/issues",
        "Releases": "https://github.com/libranet/autoset-pwd/releases",
        "Repository": "https://github.com/libranet/autoset-pwd"
    },
    "split_keywords": [
        "entrypoints",
        "sitecustomize",
        "pwd"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "384dafbdf1727baad73e5b7f2860994555fe74b3eefaaa6a2557367f38c9a4d6",
                "md5": "471367e28b2ecad1ac59a89a974dadef",
                "sha256": "5a5a4ff4c40adfbd6781b96b760341998fd497c403c2006e4bb60422fdd70f68"
            },
            "downloads": -1,
            "filename": "autoset_pwd-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "471367e28b2ecad1ac59a89a974dadef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0",
            "size": 3412,
            "upload_time": "2023-10-05T08:17:38",
            "upload_time_iso_8601": "2023-10-05T08:17:38.961695Z",
            "url": "https://files.pythonhosted.org/packages/38/4d/afbdf1727baad73e5b7f2860994555fe74b3eefaaa6a2557367f38c9a4d6/autoset_pwd-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4438c77f7acce819d24e92892e1cb86f80beb541eaaa50ea13a874a1186d368d",
                "md5": "2cf797359916af652a655ed898744ac5",
                "sha256": "1030d2596057326a6b7d5ce9491516c6b9196a01035aa30808b3af50a56174b7"
            },
            "downloads": -1,
            "filename": "autoset_pwd-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2cf797359916af652a655ed898744ac5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0",
            "size": 5143,
            "upload_time": "2023-10-05T08:17:40",
            "upload_time_iso_8601": "2023-10-05T08:17:40.982045Z",
            "url": "https://files.pythonhosted.org/packages/44/38/c77f7acce819d24e92892e1cb86f80beb541eaaa50ea13a874a1186d368d/autoset_pwd-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 08:17:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "libranet",
    "github_project": "autoset-pwd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "autoset-pwd"
}
        
Elapsed time: 0.13384s