renemarc / countdoom Goto Github PK
View Code? Open in Web Editor NEW🤯Countdoom: a Doomsday Clock client 🕚 …and Python package! 🐍
Home Page: https://pypi.org/project/countdoom/
License: MIT License
🤯Countdoom: a Doomsday Clock client 🕚 …and Python package! 🐍
Home Page: https://pypi.org/project/countdoom/
License: MIT License
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Scripts\countdoom.exe\__main__.py", line 7, in <module>
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\site-packages\countdoom\cli.py", line 41, in cli
loop.run_until_complete(main(args))
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\site-packages\countdoom\cli.py", line 73, in main
data = await countdoom_client.fetch_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\site-packages\countdoom\client.py", line 131, in fetch_data
'clock': self.clock(),
^^^^^^^^^^^^
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\site-packages\countdoom\client.py", line 85, in clock
return self.countdown_to_time(self._countdown, clock_format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\site-packages\countdoom\client.py", line 325, in countdown_to_time
return (midnight - delta).strftime(time_format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid format string
open cmd and type "countdoom" or run in python:
from typing import Dict, Union
import asyncio
from countdoom import CountdoomClient
async def async_get_doomsday_clock() -> Dict[str, Union[str, float, None]]:
"""
Get current Doomsday Clock value using AsyncIO.
:return: Dictionary of Doomsday Clock representation styles
"""
client = CountdoomClient()
data = await client.fetch_data()
return data
async def main():
doomsday_clock = await async_get_doomsday_clock()
print("Doomsday Clock:", doomsday_clock)
asyncio.run(main())
Windows 10 22H2, python 3.11
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.