semvec/pypi-packages huggingface dataset:
sunrisesunset 1.0.2
This class provides the sunrise and sunset times for various zeniths, latitudes and longitudes.
License: MIT

**************
Sunrise Sunset
**************

.. image:: https://img.shields.io/pypi/v/sunrisesunset.svg
   :target: https://pypi.python.org/pypi/sunrisesunset
   :alt: PyPi Version

.. image:: http://img.shields.io/pypi/wheel/sunrisesunset.svg
   :target: https://pypi.python.org/pypi/sunrisesunset
   :alt: PyPI Wheel

.. image:: http://img.shields.io/pypi/pyversions/sunrisesunset.svg
   :target: https://pypi.python.org/pypi/sunrisesunset
   :alt: Python Versions

.. image:: http://img.shields.io/pypi/l/sunrisesunset.svg
   :target: https://pypi.python.org/pypi/sunrisesunset
   :alt: License

The MIT License (MIT)

Overview
========

Python API to determine sunrise and sunset. It accepts five zenths: official
civil, nautical, amateur, and astronomical.

Basic Usage
===========

.. code-block:: python

    import datetime
    from sunrisesunset import SunriseSunset

    dt = datetime.datetime.now()    
    rs = SunriseSunset(dt, lat=35.9513, lon=83.9142, zenith='official')
    rise_time, set_time = rs.sun_rise_set
    print(f"     Sunrise: {rise_time}")
    print(f"      Sunset: {set_time}")
    print(f"    Is night: {rs.is_night()}\n")

Running the Test
================

The pip installed package will not be enough to run the test. You will
also need to pip install geopy and timezonefinder.

There is a more complete example in the test at the end of the
```sunrisesunset.py``` file.

You will be asked for an address, just a city name is okay. Then you will
be asked for the time. It takes an ISO formatted time at minimum the year,
month, and day needs to be entered.

.. code-block:: console

    python sunrisesunset/sunrisesunset.py

    Enter an address: Chicago
    Chicago, Cook County, Illinois, United States
    Enter date in ISO format (yyyy-mm-dd hh:mm:ss): 2023-12-16 12
    Timezone: America/Chicago
    Test zenith
    Using zenith: official
       Date/Time: 2023-12-16 12:00:00-05:00
         Sunrise: 2023-12-16 08:11:12.111139-05:00
          Sunset: 2023-12-16 17:20:16.524534-05:00
        Is night: False

    Using zenith: civil
       Date/Time: 2023-12-16 12:00:00-05:00
         Sunrise: 2023-12-16 07:39:33.419425-05:00
          Sunset: 2023-12-16 17:51:55.167217-05:00
        Is night: False

    Using zenith: nautical
       Date/Time: 2023-12-16 12:00:00-05:00
         Sunrise: 2023-12-16 07:04:25.491129-05:00
          Sunset: 2023-12-16 18:27:03.015662-05:00
        Is night: False

    Using zenith: amateur
       Date/Time: 2023-12-16 12:00:00-05:00
         Sunrise: 2023-12-16 06:47:20.286033-05:00
          Sunset: 2023-12-16 18:44:08.169022-05:00
        Is night: False

    Using zenith: astronomical
       Date/Time: 2023-12-16 12:00:00-05:00
         Sunrise: 2023-12-16 06:30:29.951023-05:00
          Sunset: 2023-12-16 19:00:39.782789-05:00
        Is night: False

    Test 24 hours for every 20 minutes.
    ...
dycord 0.5.2
An easy-to-use extension for Discord.py and Pycord
License: MIT
Requires Python: >=3.9
Keywords: discord,pycord,py-cord,discord.py



An easy-to-use extension for [Discord.py](https://github.com/Rapptz/discord.py)
and [Pycord](https://github.com/Pycord-Development/pycord) with some utility functions.

### ✏️ Reduce boilerplate code
- Easy cog management
- Embed templates
- Datetime and file utilities
- Wrapper for [aiosqlite](https://github.com/omnilib/aiosqlite)

### ✨ Error handling
- Automatic error handling for slash commands
- Error webhook reports
- Custom logging

### ⚙️ Extensions
- **Help command** - Automatically generate a help command for your bot
- **Status changer** - Change the bot's status in an interval
- **Blacklist** - Block users from using your bot

## Installing
Python 3.9 or higher is required.
```
pip install dycord
```
You can also install the latest version from GitHub. Note that this version may be unstable
and requires [git](https://git-scm.com/downloads) to be installed.
```
pip install git+https://github.com/sqiuwsqjjsxsajisaj/dycord
```
If you need the latest version in your `requirements.txt` file, you can add this line:
```
acecprd @ git+https://github.com/sqiuwsqjjsxsajisaj/dycord
```

## Useful Links
- [Pycord](https://docs.pycord.dev/) | [Discord.py](https://discordpy.readthedocs.io/en/stable/)
- [PyPi](https://pypi.org/project/dycord/)

## Examples
- For more examples, see the [example repository](https://github.com/tibue99/ezcord_template)
or the [sample code](https://ezcord.readthedocs.io/en/latest/examples/examples.html).
- **Note:** It's recommended to [load the token](https://guide.pycord.dev/getting-started/creating-your-first-bot#protecting-tokens) from a `.env` file instead of hardcoding it.
dycord can automatically load the token if a `TOKEN` variable is present in the `.env` file.

### Pycord
```py
import dycord
import discord

bot = dycord.Bot(
    intents=discord.Intents.default()
)

if __name__ == "__main__":
    bot.load_cogs("cogs")  # Load all cogs in the "cogs" folder
    bot.run("TOKEN")
```

### Discord.py
```py
import asyncio
import discord
import dycord


class Bot(dycord.Bot):
    def __init__(self):
        super().__init__(intents=discord.Intents.default())

    async def setup_hook(self):
        await super().setup_hook()
        await self.tree.sync()


async def main():
    async with Bot() as bot:
        bot.add_help_command()
        bot.load_cogs("cogs")  # Load all cogs in the "cogs" folder
        await bot.start("TOKEN")


if __name__ == "__main__":
    asyncio.run(main())
```

## Contributing
I am always happy to receive contributions. Here is how to do it:
1. Fork this repository
2. Make changes
3. Create a pull request