Skip to main content

Red Packets Split Algorithm

Project description

RedPackets Split & Return split_list if succeed & Raise Exception if failed

Installation

pip install redpackets

Usage

import redpackets

# Redpackets Split
redpackets.split_dollar(total, num, min=0.01)
redpackets.split_cent(total, num, min=1)
# cent=False equals split_dollar
# cent=True equals split_cent
redpackets.split(total, num, min=None, cent=False)

# Exchange Cent & Dollar
redpackets.cent(dollar, rate=100, cast_func=int)
redpackets.dollar(cent, rate=100, cast_func=float)

# Mul & Div
redpackets.mul(multiplicand, multiplicator, cast_func=float)
redpackets.div(dividend, divisor, cast_func=float)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redpackets-1.0.8.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

redpackets-1.0.8-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file redpackets-1.0.8.tar.gz.

File metadata

  • Download URL: redpackets-1.0.8.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redpackets-1.0.8.tar.gz
Algorithm Hash digest
SHA256 a0f28a0df97e9f3ecdfe4e6b0423b214268d8d1537e9771996ab3ad377962af8
MD5 76a70b84227a22c26c78a78516df8707
BLAKE2b-256 4e815a91cb916ef79d8c5a88288ae7014cee86b7cb4a537b0ec03845ae9a55c3

See more details on using hashes here.

File details

Details for the file redpackets-1.0.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for redpackets-1.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 39586dbb4242639229f2c18bb51a3010fdc3e4c52ce4dc10823b5530dd02633e
MD5 acbe1918436db84845bc080a8627ea9f
BLAKE2b-256 5e6ab77e3795fd637965a33034029acbe871828a3f515fdbff63c172f06ea3c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page