semvec/pypi-packages huggingface dataset:
here 1.4.1
Python package that replicates the R package called 'here'.
Requires Python: >=3.8

# 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.

With `here` in R, you never ever have to deal with `setwd` junk.
With `here` in Python, you never ever have to deal with hard-coding full filepaths or working directory junk.

With both, you can define file paths *relative to the file that calls `here()` and it will always work!

## Features

- Determine the directory of the current file.
- 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:

```bash
pip install --upgrade here
```

## Example Usage

```python
# Get the file working directory
file_working_directory = get_file_working_directory()
print(f"File working directory: {file_working_directory}")
>>> "/Users/michaelboerman/Code/here/here"

# Resolve a relative path using the here function
resolved_path = here("data/output")
print(f"Resolved path: {resolved_path}")
>>> "/Users/michaelboerman/Code/here/data/output"
```

It works on both .py and .ipynb files!
aws-adfs-login-helper 1.0.1
AWS Login Tool - ADFS authentication with YAML configuration
Requires Python: >=3.8

# aws-login
A python util to assist with logging into AWS via aws-adfs tool.



# Usage
## Install
- Install via `pip`
```shell
pip install aws-adfs-login-helper
```

## Config
- All config will be in `$HOME/.config/aws-login.yaml`
```yaml
profiles:
  eu:
    region: eu-west-1
    username: "aws\\me"
    adfs-host: adfs.hostname
  us:
    region: us-east-1
    username: "aws\\me"
    adfs-host: "adfs.com"

environments:
  dev:
    state_account_id: "12312312312"
    target_account_id: "12512512512"
    session_duration: 900
  tf-stage:
    state_account_id: "5215125125125"
    target_account_id: "621612612612"
    session_duration: 900
  prod:
    state_account_id: "4124152186221"

defaults:
  role_name: "ROLE-Root"
  session_duration: 900

ssl:
  ca_bundle_path: "~/.ssh/aws_certs/eu.pem"
  verify_ssl: true
```
- `state_account_id` = Where the terraform state is located, if this is the only value set will default `target_account_id` to be the same. 
- `target_account_id` = The target for our terraform. If you have state in a shared account you want to use shared as the `state` account and the target as well.. the target.


## Login

- Since most times you will need to enter your ADFS password for the first time of the day, you should call the tool like this for the initial invocation for the day.
  - As a result you need to login without exporting the variables
```shell
aws-login -e dev
```
- This will call aws-adfs and ask for your password / 2FA etc.

- For actual usage you want to call it as so:
```shell
eval $(aws-login login -e prod)
```
- As we have already authed to adfs we can just run this and trust our variables get exported.

## Extras
- `aws-login --help` for extra help info
- `aws-login login --help ` Extra help for the `login` command.
- `aws-login --install-completion` Shell completion
- `aws-login list-environments` Prints all the envs you have.
- `aws-login list-profiles` prints all the profiles you have, so you don't have to `cat` the config file.


# Dev Notes
python -m build 
twine upload -r pypi dist/*
absolidix-client 0.8.4
Absolidix infra API client in Python
Requires Python: >=3.9
Keywords: absolidix, client

# Absolidix API client

[![DOI](https://zenodo.org/badge/563802198.svg)](https://doi.org/10.5281/zenodo.7693569)
[![PyPI](https://img.shields.io/pypi/v/absolidix_client.svg?style=flat)](https://pypi.org/project/absolidix-client)

This library allows for programmatic interactions with the Absolidix infrastructure.

## Installation

`pip install absolidix_client`

## Usage

There are two client flavors: **asyncronous** `asyncio` client
and simplified **synchronous** client.

### Asynchronous client

An asynchronous client is `AbsolidixAPIAsync`. Example of usage:

```python
from absolidix_client import AbsolidixAPIAsync, AbsolidixTokenAuth

async def main():
    async with AbsolidixAPIAsync(API_URL, auth=AbsolidixTokenAuth("VERY_SECRET_TOKEN")) as client:
        print(await client.v0.auth.whoami())
        data = await client.v0.datasources.create(content, name)
        results = await client.v0.calculations.create_get_results(data["id"])
        print(resuls)
```

See `examples` directory for more examples.

### Synchronous client

A synchronous client is `AbsolidixAPI`. Example of usage:

```python
from absolidix_client import AbsolidixAPI, AbsolidixTokenAuth

client = AbsolidixAPI(API_URL, auth=AbsolidixTokenAuth("VERY_SECRET_TOKEN"), timeout=5)
data = client.v0.datasources.create(content, name)
results = client.v0.calculations.create_get_results(data["id"], timeout=False)
print(results)
```

NB in development one can replace a `VERY_SECRET_TOKEN` string with the development user email, e.g.
`admin@test.com` (refer to **users_emails** BFF table).

## Contributing

Please give a minute to the [contribution guide](./CONTRIBUTING.md).

## License

Author Sergey Korolev, Tilde Materials Informatics

Copyright 2024-2025 Tilde Materials Informatics

Copyright 2023-2024 BASF SE

BSD 3-Clause