semvec/pypi-packages huggingface dataset:
radarcord-py 1.0.0
The best way to interact with the Radarcord API!
Requires Python: >=3.8

# Radarcord-py

The best way to interact with the Radarcord API, now available in the Python flavor!

## Features

- Easy to use, less pressure on writing HTTP yourself.
- Supports `discord.py` and may support other libraries soon.
- May come with Webhook support soon.

## Installation

Installation is as easy as running one command.

```bash
pip install radarcord-py
```

## Usage

Using the package is super easy as well! Open up your Python project, and let's go!

```python
from typing import Any
import discord
import radarcord


class Client(discord.Client):
    radar: radarcord.RadarcordClient

    def __init__(self, intents: discord.Intents, **options: Any):
        super().__init__(intents=intents, options=options)
        self.radar = radarcord.RadarcordClient(self, "some_authorization") # Replace `some_authorization` with your Radarcord API token

    async def on_ready(self):
        print("The client is ready!")

        # shard_count defaults to 1 if not explicitly passed in.
        self.radar.post_stats()

        # If you have a sharded client:
        self.radar.post_stats(self.shard_count)

intents = discord.Intents.default()
client = Client(intents=intents)
client.run("TOKEN") # Replace TOKEN with your Discord bot's token.
```

## Getting reviews

Your bot reviews are super important to the image of your bot, so we have given support to get those reviews!

```python
from typing import Any
from radarcord import Review
import discord
import radarcord


class Client(discord.Client):
    radar: radarcord.RadarcordClient

    def __init__(self, intents: discord.Intents, **options: Any):
        super().__init__(intents=intents, options=options)
        self.radar = radarcord.RadarcordClient(self, "some_authorization")  # Replace `some_authorization` with your Radarcord API token

    async def on_ready(self):
        print("The client is ready!")
        reviews: list[Review] = self.radar.get_reviews() # Typing is a bit buggy currently, explicitly type reviews as `list[Review]` for now.

        # This is an example to make sure you got the reviews.
        # You can also embed these into your website if preferred.
        for review in reviews:
            print(review)


intents = discord.Intents.default()
client = Client(intents=intents)
client.run("TOKEN") # Replace TOKEN with your Discord bot's token.
```

## License

This package is licensed under the **[MIT License](https://github.com/Yoshiboi18303/radarcord-py/blob/main/LICENSE)**

## Bugs?

Report those bugs **[here](https://github.com/Yoshiboi18303/radarcord-py/issues)**!

---

Copyright © 2023 - present Yoshiboi18303

**[Radarcord](https://radarcord.net)** is owned by Scorprian.

**Do not reach out to Yoshiboi18303 for any Radarcord issues that do not involve the package.**

**If you have an issue with Radarcord, reach out to Scorprian in the [Discord server](https://discord.gg/km8xRh2atD).**
akrophonobolos 1.0.0
Ancient Athenian acrophonic numeral converter
Requires Python: >=3.8

# Akrophonobolos

Python package for handling Ancient Athenian monetary values in
talents, drachmas and obols, including input and output in Greek
acrophonic numerals (such as 𐅎, 𐅍, 𐅌, 𐅋, 𐅊, etc.)


## Installation

    pip install akrophonobolos
    
## Usage

Read the full documentation on [Read the Docs](https://akrophonobolos.readthedocs.io/en/latest/)

Akrophonobolos provides functions for parsing, manipulating, and
formatting Greek acrophonic numerals. It also provides a class,
`Khremata` encapsulating these methods. Interally, the python
`fractions` library is used to minimize issues caused by floating
point arithmetic.

    >>> import akrophonobolos as obol
    >>> cash = obol.parse_greek_amount("Τ𐅅ΗΗΗΔ𐅂𐅂𐅂Ι𐅁")
    >>> cash
    Fraction(81759, 2)
    >>> obol.format_amount(cash)
    '1t 813d 1½b'
    >>> obol.format_amount(cash, obol.Fmt.ENGLISH)
    '1 talent, 813 drachmas, 1½ obols'
    >>> obol.format_amount(cash, obol.Fmt.GREEK)
	'Τ𐅅ΗΗΗΔ𐅂𐅂𐅂Ι𐅁'
	>>> obol.format_amount(cash * 2)
	'2t 1626d 3b'
	
Using the class:

    >>> cash1 = obol.Khremata('1t')
	>>> cash2 = obol.Khremata('300d 3b')
	>>> cash1 + cash2
	Khremata (1t 300d 3b [= 37803.0 obols])
	>>> cash1 - cash2
	Khremata (5699d 3b [= 34197.0 obols])
	>>> cash1/cash2
	Fraction(12000, 601)
	
There are functions for working with the sort of interest we see in
inscriptions such as [IG I³
369](https://epigraphy.packhum.org/text/381).

    >>> rate = obol.interest_rate("5t", 1, "1d")
    >>> rate
    Fraction(1, 30000)
	>>> obol.loan_term("𐅊", "ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ", rate)
	1397

The first line calculates the rate required for 1 drachma interest on
1 talent in 1 day. The last applies it to the amounts found on line 7
of that inscription for the principal (𐅊, 50 talents) and interest
(ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ, 2 talents 1,970 drachmas) to determine that the loan
term was 1,397 days.

This package also provides two command lin scripts. `obol` performs conversion and simple math:

    $ obol 𐅉𐅉𐅈 348d "1d 5.5b" 14T1800D4O
    𐅉𐅉𐅈 = 25 talents
    348d = ΗΗΗΔΔΔΔ𐅃𐅂𐅂𐅂
    1d 5.5b = 𐅂ΙΙΙΙΙ𐅁
    14T1800D4O = 𐅉ΤΤΤΤΧ𐅅ΗΗΗΙΙΙΙ

    $ obol 1t + 1000d
    ΤΧ = 1t 1000d
    $ obol 1t - 1000d
    𐅆 = 5000d

`logistes` does loan calculations:

    $ logistes -p 50t -d 1397
    𐅊 (50t) at 10 drachmas per day for 1397 days = ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ (2t 1970d) interest
    $ logistes -p 50t -i ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ
    𐅊 (50t) at 10 drachmas per day for 1397 days = ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ (2t 1970d) interest
    $ logistes -d 1397 -i ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ
    𐅊 (50t) at 10 drachmas per day for 1397 days = ΤΤΧ𐅅ΗΗΗΗ𐅄ΔΔ (2t 1970d) interest

## Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/seanredmond/akrophonobolos