semvec/pypi-packages huggingface dataset:
nice-auth 0.1.5
A Python library for NICE authentication
Requires Python: >=3.6

# python-nice-auth

A Python library for NICE authentication.

**Current version: 0.1.5**

## Overview

`python-nice-auth` is a Python library that provides an interface for interacting with the NICE authentication API. It supports obtaining tokens, generating encrypted tokens, and creating URLs for NICE authentication services.

## Installation

To install the library, use pip:

```bash
pip install -U nice-auth
```

## Configuration

Before using the library, you need to set up the necessary configuration values. Add the following environment variables to your .env file or set them directly in your environment:

```env
NICE_AUTH_BASE_URL=https://svc.niceapi.co.kr:22001
NICE_CLIENT_ID=your_client_id
NICE_CLIENT_SECRET=your_client_secret
NICE_PRODUCT_ID=your_product_id
NICE_RETURN_URL=https://yourdomain.com/verify
NICE_AUTHTYPE=M
NICE_POPUPYN=N
```

## Usage

### Initializing the Service

First, you need to initialize the NiceAuthService with the necessary configuration values:

```python
from nice_auth.services import NiceAuthService

# Initialize the service with configuration values
nice_auth_service = NiceAuthService(
    base_url="https://nice.checkplus.co.kr",
    client_id="your_client_id",
    client_secret="your_client_secret",
    product_id="your_product_id",
    return_url="your_return_url",
    authtype="your_authtype",
    popupyn="your_popupyn"
)
```

### Getting a Token

You can obtain a token by calling the get_token method:

```python
access_token = nice_auth_service.get_token()
```


### Getting an Encrypted Token

To get an encrypted token, use the get_encrypted_token method:

```python
encrypted_token_data, req_dtim, req_no = nice_auth_service.get_encrypted_token(access_token)
```


### Getting NICE Auth Data
To get the necessary data for NICE authentication, use the get_nice_auth method:

```python
auth_data = nice_auth_service.get_nice_auth()
```


### Generating NICE Auth URL
Finally, you can generate the NICE authentication URL:

```python
nice_auth_url = nice_auth_service.get_nice_auth_url()
```

### Verifying Authentication Result
To verify the authentication result, use the verify_auth_result method:

```python
auth_result = nice_auth_service.verify_auth_result(enc_data, key, iv)
```

### Complete Example
Here is a complete example of using the library:

```python
from nice_auth.services import NiceAuthService

# Initialize the service with configuration values
nice_auth_service = NiceAuthService(
    base_url="https://nice.checkplus.co.kr",
    client_id="your_client_id",
    client_secret="your_client_secret",
    product_id="your_product_id",
    return_url="your_return_url",
    authtype="your_authtype",
    popupyn="your_popupyn"
)

# Get a token
access_token = nice_auth_service.get_token()

# Get an encrypted token
encrypted_token_data, req_dtim, req_no = nice_auth_service.get_encrypted_token(access_token)

# Generate NICE Auth URL
nice_auth_url = nice_auth_service.get_nice_auth_url()
print(f"NICE Auth URL: {nice_auth_url}")
```

## License
This project is licensed under the MIT License.
bytecorefast 1.0.2
A high-performance, 8-bit CPU emulator, designed as a drop-in replacement for ByteCore, offering enhanced speed while maintaining full compatibility with the original ByteCore interfaces.
Requires Python: >=3.11

# ByteCoreFast Emulator

ByteCoreFast is a high-performance drop-in replacement for the [ByteCore Emulator](https://github.com/joakimwinum/bytecore). It extends the ByteCore classes and replaces the emulator engine with a custom engine written in C for enhanced speed. This project aims to maintain 100% compatibility with the public interfaces of the [ByteCore Emulator](https://github.com/joakimwinum/bytecore). If you encounter any incompatibilities, please [create an issue](https://github.com/joakimwinum/bytecorefast/issues) detailing the discrepancy.

## Key Features

- Fast performance for long-running programs.
- Seamless integration with ByteCore Emulator projects.
- Simple installation and usage.

## Installation

### Using pip

To install ByteCoreFast, run:

```bash
pip3 install bytecorefast
```

### Manual Setup

1. Ensure you have Python 3.11 or newer installed.
2. Clone the repository and navigate into the root directory.
3. (Optional) Create a Python virtual environment to isolate dependencies.
4. Install the necessary dependencies:

```bash
pip3 install -r requirements.txt
```

### Gitpod Setup

You can also use Gitpod to run the emulator by clicking [here](https://gitpod.io/#https://github.com/joakimwinum/bytecorefast).

## How to Use

To use ByteCoreFast, replace the import statement in your project:

```python
# Original import
from bytecore.emulator import ByteCore

# New import for faster performance
from bytecorefast.emulator import ByteCore
```

You should now see improved performance for long-running programs. Note that small programs or step-by-step execution might be slower due to overhead.

## Running the Emulator

To run the emulator, follow the instructions provided in the [ByteCore project](https://github.com/joakimwinum/bytecore).

### Troubleshooting

If the C code is not compiled for your system, you may encounter issues. In such cases, please revert to the original ByteCore Emulator written entirely in Python.

## License

This project is licensed under the terms of the MIT License. See the [LICENSE](https://github.com/joakimwinum/bytecorefast/blob/main/LICENSE) file for the full text.