semvec/pypi-packages huggingface dataset:
gp-wrapper 0.9.8
A Google Photos API wrapper library
Requires Python: >=3.8.0
Keywords: functions,methods,classes,API

# gp_wrapper v=0.9.8
A Google Photos API wrapper library

* Official API is already supported

## What does this package offer?
Support for all of the official API and more convenience function as well.
A-lot of well defined API inspired Classes and Enums to simplify the usage.
* `GooglePhotos` class - wrapper over authenticated HTTP session
* `Album` Class - handles all of the global and instance methods for an Album
* `MediaItem` Class - handles all of the global and instance methods for MediaItem
* Enums: `RequestType`, `HeaderType`, `MimeType`, `PositionType`, `EnrichmentType`, `MediaItemMaskTypes`, `AlbumMaskType`, `RelativeItemType`, `StatusCode`
* Classes: `SimpleMediaItem`, `NewMediaItem`, `AlbumPosition`, `Status`, `MediaItemResult`, `MediaMetadata`, `ContributorInfo`
## Quick Start
1. Create a [Google Cloud Console](https://console.cloud.google.com/) project
2. Enable google photos API [here](https://console.cloud.google.com/apis/library/photoslibrary.googleapis.com)
3. Fill information [here](https://console.cloud.google.com/apis/credentials/consent)
    1.  Fill application name and detail
    2. Apply scopes
        1. https://www.googleapis.com/auth/photoslibrary,
        2. https://www.googleapis.com/auth/photoslibrary.appendonly
        3. https://www.googleapis.com/auth/photoslibrary.sharing
        4. https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
    3. Add a google account as a Test User which will be able to use you project as an 'end user'
3. Extract relevant data for [`client_secrets.json`](./READMES/client_secrets_example.json)
2. `pip install gp_wrapper`
3. See example [here](./READMES/example.md)
pyfinmodels 1.0.0
A python based financial models simulation to estimate the value of π
Requires Python: >=3.6

#### FinModels

#### Overview

`FinModels` is a Python package that provides implementations of various financial models commonly used in finance and investment analysis.

#### Installation

You can install the package using pip:
pip install finmodels

Included Financial Models
1. Binomial Option Pricing Model (BOPM)
The Binomial Option Pricing Model is a numerical method used for option pricing. It calculates the option price and call option price based on parameters such as underlying price, strike price, risk-free rate, volatility, time to maturity, and the number of steps in the binomial tree.


from finmodels.models import binomial_option_pricing

#### Example usage for Put Option Price

Parameters
underlying_price: Current price of the underlying asset.

strike_price: Strike price of the option.

risk_free_rate: Risk-free interest rate.

volatility: Volatility of the underlying asset.

time_to_maturity: Time to maturity of the option.

num_steps: Number of steps in the binomial tree.

```bash
call_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'call')

put_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'put')

print(f"Call Option Price: {call_price:.2f}")
print(f"Put Option Price: {put_price:.2f}")
```
woahdiscord 0.1.2
A python library allowing discord to be used unlimited cloud storage.

A python library allowing discord to be used unlimited cloud storage. 

## What's the purpose?

Cloud storage is expensive even if you have a 10 USD and 20 USD laying around. Social media platforms like Instagram, YouTube, Discord offers unlimited storage to upload attachments and files. Though being limited to certain file extensions in some instances. 

With careful planning, we can take advantage of that and upload data from our local storage to those platforms and use them as cloud storages. In this library, I have implemented the required functions to achieve that.

### Examples

**How to split a file into small chunks**

```Python
from woahdiscord import split_file

chunk_size_mb = 20 Â # Set your desired chunk size in megabytes

file_or_folder_path = 'woahdiscord\Wireshark-4.2.2-x64.exe'

if os.path.isfile(file_or_folder_path):

Â  Â  split_file(file_or_folder_path, chunk_size_mb, add_metadata=True)

elif os.path.isdir(file_or_folder_path):

Â  Â  split_files_in_folder(file_or_folder_path, chunk_size_mb, add_metadata=True)

else:

Â  Â  print('Invalid file or folder path.')
```

**How to merge the chunks**

```Python
from woahdiscord import merge_files
folder_path = "Wireshark-4.2.2-x64_chunks"

merge_files(folder_path)
```

**How to convert a file into jpg/jpeg**

```Python
from woahdiscord import file_jpg

input_path = 'woahdiscord\Wireshark-4.2.2-x64.exe' Â # Can be a file or a directory

file_jpg(input_path)
```

Reconstructing jpg into original

```Python
from woahdiscord import osmosis

folder_path = 'CXh2bgPY' Â # Provide the folder path here

osmosis(folder_path)
```

**Setting up discord bot to upload files automatically**

```Python
from woahdiscord import auto_upload

auto_upload_files("your/folder/path", "<Your Bot Token>")
```
sour-cherry 1.0.12
A CLI tool to build essentials for FastAPI development.
Requires Python: >=3.8

# Cherry
This is a Python based CLI tool to create essentials for FastAPI backend development.

# Introduction 
 - Built with Python Click, you can easily create and activate virtual environments, insall some of the popular and necessary libraries and dependencies all with one command. 
 - Additionally, you can create files and directories in a specified hierachical order to ease project clutter also with one single command.
 - All python files are initiated with some boilerplate code and examples that you can customize according to your project needs.

# Usage
> [!IMPORTANT]
> Cherry is compatible with windows systems. UNIX support to be added soon.

 - **Install cherry** Run the pip command as shown above.
 - Cherry has two commands: `paint` & `blossom`.
 - **Paint:** `cherry paint` creates a virtual environment, activates it and installs some of the required dependencies. It accepts one argument, `name`, flagged as `-n` which will be used as the name of your virtual environment. Default is 'venv' if -n is not provided. For example `cherry paint -n example` will create a virtual environment called 'example'.
 - **Blossom:** running `cherry blossom` creates the necessary files and directories.
 - After running the two commands, switch to your new virtual environment by clicking on the pop-up vscode message and starting a new console window or running `name-of-your-virtual-environment\Scripts\activate`. For e.g., if you created a virtual environment called 'example', run `example\Scripts\activate`.
  - **You're now ready to start developing!!**
simulatorpy 1.0.2
A python based Monte Carlo simulation to estimate the value of π
Requires Python: >=3.6

### Monte Carlo Simulation

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

## Overview

This Python script performs a Monte Carlo simulation to estimate the value of Ï€.

## Features

- Monte Carlo simulation algorithm
- Estimation of the value of Ï€

#### Installation

You can install the script using pip:

```bash
pip install pymontecarlo

#### Example

```python
# Import the Monte Carlo simulation function
from monte_carlo_simulation import monte_carlo_simulation

# Set the number of random points to generate
num_points = 10000

# Run the Monte Carlo simulation to estimate the value of Ï€
result = monte_carlo_simulation(num_points)

# Display the result
print(f"Estimated value of Ï€ using {num_points} random points: {result}")
montecarlomodel 1.0.2
Monte Carlo simulation to estimate the value of π
Requires Python: >=3.6

### Monte Carlo Simulation

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

## Overview

This Python script performs a Monte Carlo simulation to estimate the value of Ï€.

## Features

- Monte Carlo simulation algorithm
- Estimation of the value of Ï€

#### Installation

You can install the script using pip:

```bash
pip install pymontecarlo

#### Example

```python
# Import the Monte Carlo simulation function
from monte_carlo_simulation import monte_carlo_simulation

# Set the number of random points to generate
num_points = 10000

# Run the Monte Carlo simulation to estimate the value of Ï€
result = monte_carlo_simulation(num_points)

# Display the result
print(f"Estimated value of Ï€ using {num_points} random points: {result}")
run-as-admin 1.7.9
This script provides a simple way to execute a file as an administrator on Windows systems.
Requires Python: >=3.8

# run-as-admin

## Introduction
This script provides a simple way to execute a file as an administrator on Windows systems. It utilizes the `RunAsAdmin` class to handle the execution and logging of commands. By running a file as an administrator, it bypasses the usual User Account Control (UAC) prompts.

## Installation
You can install run-as-admin via pip:
```bash
pip install run-as-admin
```

## Example Usage
Install 


```python
import os
from run_as_admin import RunAsAdmin

# Define the file path of the executable
file_path = "C:\Windows\System32\cmd.exe"  # Replace this with the actual file path

# Define the path for the log file
log_file_path = os.path.join(os.getcwd(), "execution_log.log")

# Create a RunAsAdmin instance
runner = RunAsAdmin(file_path, True,log_file_path)

# Execute the file as administrator
runner.execute()
```


## Parameters
- `file_path` (str): The path to the executable file you want to run.
- `logging` (bool): Set to `True` if you want to keep log, `False` otherwise.
- `log_file_path` (str, optional): The path to the log file where execution details will be saved. If not specified, `execution_log.log` file will be created in current directory.

## Reminder
If you do not want the UAC prompt to appear when executing the file, you can adjust the User Account Control settings. However, it's important to note that disabling UAC entirely for administrators can pose security risks.

### Local Security Policy
In the Local Security Policy settings, navigate to:
```rust
Security Settings -> Local Policies -> Security Options
```

Adjust the behavior of the User Account Control: Run all administrators in Admin Approval Mode. Disabling this policy will effectively disable UAC for administrators, but it's not recommended for security reasons.

## Dependencies
- Python 3.x
- Windows operating system

## License
Copyright (c) 2024 Barno Chakraborty

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
hatch-semver 2.0.2
Hatch plugin for semver versioning scheme
Requires Python: >=3.9
Keywords: development,hatch,plugin,version,versioning

# hatch-semver

A plugin for [hatch][hatch] to support [semantic versioning][semver]. Hatch-semver relies on [python-semver][python-semver] for all the versioning logic.

## Setup

Introduce hatch-semver as a build-dependency to your project (in your `pyproject.toml`):

```toml
[build-system]
requires = [
    "hatchling",
    "hatch-semver",
]
build-backend = "hatchling.build"
```

Further down in `pyproject.toml`, 
where you set up the *hatch version* command, 
set version scheme to `semver`:
```toml
[tool.hatch.version]
path = "src/<your_project>/__about__.py"
validate-bump = true
scheme = "semver"
```

### Beware

Hatch-semver plugin will only work with project versions which can be readily parsed by [python-semver][python-semver].
Therefore, if you are introducing hatch-semver into an existing project, you must **make sure that the project's current version is a valid semantic version.**
You can test that [here][semver-regex].

## Quick Start

Many of hatch's [standard versioning][hatch_versioning] commands also work for hatch-semver to bump your project's version in a semver-compliant way. 
Such command is written as a single string of comma-separated bump instructions as a positional argument of the `hatch version` subcommand, i.e `hatch version <COMMAND>`.

Starting with `0.1.0` as the original version, here is a series of example commands which illustrate some common ways how to bump the version:

| Old Version            | Command             | New Version          |
| ---------------------- | ------------------- | -------------------- |
| `0.1.0`                | `patch`             | `0.1.1`              |
| `0.1.1`                | `minor,patch,patch` | `0.2.2`              |
| `0.2.2`                | `minor`             | `0.3.0`              |
| `0.3.0`                | `rc`                | `0.3.1-rc.1`         |
| `0.3.1-rc.1`           | `rc`                | `0.3.1-rc.2`         |
| `0.3.1-rc.2`           | `release`           | `0.3.1`              |
| `0.3.1`                | `0.9.5`             | `0.9.5`              |
| `0.9.5`                | `major,rc`          | `1.0.0-rc.1`         |
| `1.0.0-rc.1`           | `release`           | `1.0.0`              |

See the [command reference][commands] for all the commands in full detail. If you are familiar with hatch's standard versioning scheme, perhaps a [comparison][comparison] of the standard scheme and hatch-semver will be of interest.


[hatch]: https://hatch.pypa.io/
[hatch_versioning]: https://hatch.pypa.io/latest/version/#updating
[python-semver]: https://github.com/python-semver/python-semver/tree/maint/v2
[semver-regex]: https://regex101.com/r/Ly7O1x/3/
[semver]: https://semver.org/
[commands]: https://fleetingbytes.github.io/hatch-semver/user_guide/1-commands/
[comparison]: https://fleetingbytes.github.io/hatch-semver/user_guide/2-migrating-to-semver/
tomfoolery 1.1.1
CLI to generate Python dataclasses that model and load toml files (or other can-representated-as-a-dict files)
Requires Python: >=3.10
Keywords: dataclass,dataclasses,json,toml

# tomfoolery

Tool to generate Python dataclasses that model and load toml files (or other can-representated-as-a-dict files).<br>
Primarily aimed at configuration type files.

## Installation

Install with:

<pre>
pip install tomfoolery
</pre>


## Usage

Given the following file (`venue.toml`):<br><br>
![](imgs/toml.png)

Running the command
<pre>
tomfoolery venue.toml
</pre>

will produce this file (`venue.py`):<br><br>
![](imgs/dataclass.png)

which can then be used:
<pre>
>from venue import Venue
>venue = Venue.load()
>print(venue.address.city)
'Chicago'
>venue.calendar.start_month = "March"
>venue.dump()
</pre>

### Current Caveats

* Only works with `.toml` and `.json` files.
* All keys must be valid Python variable names.
seating 0.0.3
Sort the order of class functions and properties
Requires Python: >=3.10
Keywords: alphabetical,order,sort,style

# seating

Sort the order of class functions, properties, and member variables.

## Installation

Install with:

<pre>
pip install seating
</pre>


### Sorting and Priority

* Class variables declared in class body outside of a function
* Dunder methods
* Functions decorated with `property` or corresponding `.setter` and `.deleter` methods
* Class functions

Each of these groups will be sorted alphabetically with respect to themselves.

The only exception is for dunder methods.<br>
They will be sorted alphabetically except that `__init__` will be first.

If you have class contents that are grouped a certain way and you want the groups individually sorted
so that the grouping is maintained, you can use `# Seat` to demarcate the groups.



i.e. if the source is:

<pre>
class MyClass():
    {arbitrary lines of code}
    # Seat
    {more arbitrary code}
    # Seat
    {yet more code}
</pre>

then the three sets of code in brackets will be sorted independently from one another.

## Usage

#### CLI

<pre>
>seat -h
usage: seat [-h] [--start START] [--stop STOP] [-nb] [-o OUTPUT] [-d] file

positional arguments:
  file                  The file to format.

options:
  -h, --help            show this help message and exit
  --start START         Optional line number to start formatting at.
  --stop STOP           Optional line number to stop formatting at.
  -nb, --noblack        Don't format file with Black after sorting.
  -o OUTPUT, --output OUTPUT
                        Write changes to this file, otherwise changes are written back to the original file.
  -d, --dump            Dump ast tree to file instead of doing anything else. For debugging purposes.
</pre>

#### Programmatically

<pre>
from seating import seat
from pathier import Pathier

file = Pathier("somefile.py")
source = file.read_text()
source = seat(source)
file.write_text(source)
</pre>