semvec/pypi-packages huggingface dataset:
azure-integration 0.0.4
Microsoft Azure Integration
Requires Python: >=3.6

# Azure Integration

this package is an azure integration to use in the DTRG team.

for now, we just have vault integration in the package.

# HOW TO USE
### - From pypi
first, you need to install the package. to do so create a personal access token and then connect to the feed [according to these instructions.](https://dev.azure.com/keyleadhealth/Klinik/_packaging?_a=connect&feed=azure-integration) (choose pip)

then install the package:
```shell
$ pip install azure-integration # this will install latest version.
```

you need to set these env variables to access to azure:
```shell
AZURE_CLIENT_ID=YOUR_CLIENT_ID
AZURE_CLIENT_SECRET=YOUR_CLIENT_SECRET
AZURE_TENANT_ID=YOUR_TENANT_ID
```

### Secret Client
to use secret client you can do something like this:
```python
from keyvault import SecretClient

client = SecretClient(VAULT_NAME)
client.get_secret(SECRET_NAME)  # this returns KeyVaultSecret object
client.get_secret(SECRET_NAME).value  # this returns secret value as string
```

also, you can get a dict of secrets wherever you need, ex setting.py:
```python
from keyvault import SecretClient

[... whatever settings ...]

client = SecretClient(VAULT_NAME)
needed_secrets = {
    "SECRET_NAME": "SECRET_VERSION", # you can leave version blank
    "SECOND_SECRET_NAME": "SECOND_SECRET_VERSION"
}
c.get_secrets(needed_secrets)  # this will return results as KeyVaultSecret
c.get_secrets_values(needed_secrets)  # this will return results as str
```
note that you don't need to assign `get_secrets` and `get_secrets_values` functions' return value and that's because it will modify the given dict object and you can access the values within it.

### Service Name Finder
__this utility is implemented to use in dtrg projects.__

this utility will help you find needed credentials such as key vault name, postgres server address and postgres admin password secret name.
remember in development environment you should set WEBSITE_SITE_NAME to a valid website name according to patterns we use in dtrg project.

you can use it simply:
```python
from dtrg_specified import ServiceNameFinder

service_name_finder = ServiceNameFinder()
service_name_finder.kv_name # will return key vault name
service_name_finder.psql_host # will return postgres host host
service_name_finder.psql_password_secret_name # will return postgres password secret name

```

# HOW TO BUILD
if you want to build the module yourself follow the steps:
- clone this repository.
- create a venv inside it.
- install requirements by running:
```shell
$ pip install -r requirements.txt
```
- then build it:
```shell
$ python -m build
```
nicehash-python 0.0.1
NiceHash API
Keywords: nicehash,api,python

**nicehash-python**
fork of nicehash/rest-clients-demo with updated python client

# rest-clients-demo

### Source

- [python](https://github.com/nicehash/rest-clients-demo/blob/master/python/nicehash.py)

### TEST environment

Generate Api key and Secret for test platform on:

https://test.nicehash.com (User / Settings / API Keys)
Organization ID is displayed just above "+ Create new API key" button.

Use https://api-test.nicehash.com for API domain.

The entire platform runs on testnet. This means that you don’t have to use your own funds to test the platform. This is the opportunity to familiarize yourself with the new system, place hash-power orders and try trading without spending any real money.

![](https://raw.githubusercontent.com/nicehash/rest-clients-demo/master/generate_key.gif)

### PRODUCTION environment

To use production just generate key the same way on https://www.nicehash.com and use https://api2.nicehash.com for API domain.

### API docs
Can be found here: https://docs.nicehash.com/

### DEV environment

Tested using python3.8. More notes on testing in changelog. Package is still under development as some API functionality is incomplete. 

Install test dependencies: `python3.8 setup.py install -e [.dev]`
Run some tests: `python3.8 -m unittest tests.test_nicehash_public`
Run all tests: `python3.8 -m unittest discover -s ./tests`