Panclus Tutorial
Panclus… the multiporpus module…
Panclus is a python library that is used for several uses like calculation of eclipse, automating your computer, finding weather forecast, translating text and many more features!But Panclus is no longer in use the current version named PanclusGz is released recently still the name Panclus is used to install it.
Installation:
pip install panclus
When you will type this in cmd then pip will install PanclusGz and not the Panclus module.The sub-modules that are inside PanclusGz are listed below:
1. locations
2. dependencies
3. Gz
4. Installer
Now Let’s discuss about all of them in details:
1. Locations
Locations module dose not meant for finding any location it is mainly used for getting the weather reports about the temperature, wind speed, it’s description and the weather type. Locations also have many more attributes related to the information of a country and it’s area and capital.
from PanclusGz import locations as ls
Example 1: For finding the weather forecast
Python3
ls.get_weather('India')
The above code will show the output in this format:
India’s accurate temperature: -0.34°C
Wind speed: 1.78 m/s
Description: snow
Weather: Snow
Your output will depend on your location and current time.
Example 2: To get area of any country
Python3
ls.area('India')
Output:
3287590
The area will be displayed in Kilometer square.
Example 3: To find the calling code of any country
Python3
ls.country_code('India')
Output:
[‘91’]
Example 4: To find capital of a country
Python3
ls.capital('India')
Output:
New Delhi
Example 4: To get the full information of a country
Python3
ls.full_info('India')
Output:
The output will be a long info of your selected country.
2. Gz
Gz is the main module in PanclusGz . Gz has more attributes in it than locations. Gz can act as the main module in making voice assistants.
Benefits of Gz:
1. Use in Ai building.
2. Taking data from wikipedia.
3. Automating your pc.
4. Reducing the lines of gtts.
Importing the module:
from PanclusGz import Gz as gz
Below are some examples for Gz
Example 1: Making it speak
Python3
gz.speak('This is a tutorial for panclus')
This will speak the text in english language only but if you want it to speak in any other language then you should refer the below example.
Example 2: Making it speak in any other language
This attribute needs a format for it’s working. Below is the format for you:
(text_to_speak,language_code,name_of_file_to_save)
text_to_speak- It refers to the text that is required to speak
language_code- It refers to the language code of the language of your choice
name_of_the_file_to_save- This argument needs any name with .mp3 extention.
Code:
Python3
gz.speak_in_language('hello','en-Us','test.mp3')
The above code will only work in a specific enviroment.
The next version of Panclus will contain more features to make it run in any of the enviroment.
Example 3: Searching wikipedia
Python3
gz.wikit('what is programming')
Output:
Example 4: Opening the file from your pc
Python3
gz.openfile('cmd')
This will open the command prompt.
Example 4: Calculating the date of solar and lunar eclipses
For solar eclipse:
Python3
gz.date_solar_eclipse()
Output:
No one knows how long it continues.
For lunar eclipse:
Python3
gz.date_lunar_eclipse()
Output:
Example 5: Displaying date and time
To see Time:
Python3
gz.show_time()
This will show the time.
To see date:
Python3
gz.show_date()
This will show the date.
Example 6: Copy pasting the text
Python3
gz.copy('hello')
This will copy hello
Python3
gz.paste()
Output:
hello
Example 7: Translating text
Python3
gz.translate('english','hindi','hello')
Output:
नमस्ते
3. Installer
Installer is a small app in panclus to install python packages.
from PanclusGz import Installer
Output:
4. Dependencies
It is only used to see dependencies of the panclus package.
from PanclusGz import dependencies
Python3
dependencies.show_dependencies()
Output:
For more information about panclus please visit: https://pypi.org/project/panclus/