Skip to content

Commit

Permalink
setting stuff up
Browse files Browse the repository at this point in the history
  • Loading branch information
denzven committed Jun 18, 2021
1 parent 5ba7eda commit 9c1ef95
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 14 deletions.
Binary file not shown.
Binary file added dist/DenzGraphingApiWrapper_py-0.0.1.tar.gz
Binary file not shown.
31 changes: 17 additions & 14 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,59 @@ Features
- Supports discord embeds for discord bots

Installation
------------
~~~~~~~~~~~~~

Install DenzGraphingApiWrapper by running:

``pip install -i https://test.pypi.org/simple/ DenzGraphingApiWrapper-py-denzven``
``pip install DenzGraphingApiWrapper-py``
``pip install git+https://github.com/denzven/DenzGraphingApiWrapper_py.git``


Import it like this:
``from DenzGraphingApiWrapper_py import DenzGraphingApiWrapper_py as GraphingApi``
``import DenzGraphingApiWrapper_py as GraphingApi``

Usage
------
~~~~~~
Here are some examples on how to use this wrapper
::

>>> # Shell Example

>>> import DenzGraphingApiWrapper_py as GraphingApi

>>> formula = 'x**2+y**2-10'

>>> GraphingApi.heroku_graph(formula)
'https://denz-graphing-api-heroku.herokuapp.com/graph?formula=x%2A%2A2%2By%2A%2A2-10'
'<https://denz-graphing-api-heroku.herokuapp.com/graph?formula=x%2A%2A2%2By%2A%2A2-10>'

>>> GraphingApi.py_anywhere_graph(formula)
'http://denzven.pythonanywhere.com/graph?formula=%28x%2A%2A2%2By%2A%2A2-10'
'<http://denzven.pythonanywhere.com/graph?formula=%28x%2A%2A2%2By%2A%2A2-10>'


you can use this url as a picture in discord and also in embeds like this

::

from DenzGraphingApiWrapper_py import DenzGraphingApiWrapper_py as GraphingApi
import DenzGraphingApiWrapper_py as GraphingApi
insert epik code




Contribute
----------
~~~~~~~~~~

- Issue Tracker: https://github.com/denzven/DenzGraphingApiWrapper_py/issues
- Source Code: https://github.com/denzven/DenzGraphingApiWrapper_py
- Documentation = https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/
- Issue Tracker: <https://github.com/denzven/DenzGraphingApiWrapper_py/issues>
- Source Code: <https://github.com/denzven/DenzGraphingApiWrapper_py>
- Documentation = <https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/>

Support
-------
~~~~~~~

If you are having issues, please let us know.
Join the Discord Server! https://dsc.gg/chilly_place
Join the Discord Server! <https://dsc.gg/chilly_place>

License
-------
~~~~~~~~

The project is licensed under the MIT license.
69 changes: 69 additions & 0 deletions examples/Example_Code_Discord_Bot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import discord
from discord.ext import commands
import os
import datetime
import DenzGraphingApiWrapper_py as GraphingApi #pip install DenzGraphingApiWrapper-py

bot = commands.Bot(command_prefix=(">"))

@bot.event
async def on_connect():
print("the bot is ready")

@bot.event
async def on_ready():
print(f'We have logged in as {bot.user}\n')

@bot.event
async def on_command_error(ctx, error):
raise error

@bot.command()
async def pythonanywhere_graph(ctx, formula):
url = GraphingApi.py_anywhere_graph(formula)
await ctx.send(url)

@bot.command()
async def heroku_graph(ctx, formula):
url = GraphingApi.heroku_graph(formula)
await ctx.send(url)

@bot.command()
async def pythonanywhere_graph_with_Embed(ctx, formula):
url = GraphingApi.py_anywhere_graph(formula)
embed = discord.Embed(title = f' the graphical representation of \n ```{formula} = 0```',color = discord.Color.green(),url = url)
embed.set_image(url = url)
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text=f'rendered by {ctx.author.name}',icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)

@bot.command()
async def heroku_graph_with_Embed(ctx, formula):
url = GraphingApi.heroku_graph(formula)
embed = discord.Embed(title = f' the graphical representation of \n ```{formula} = 0```',color = discord.Color.green(),url = url)
embed.set_image(url = url)
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text=f'rendered by {ctx.author.name}',icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)

@bot.command()
async def github(ctx):
await ctx.send("https://github.com/denzven/DenzGraphingApiWrapper_py")

@bot.command()
async def docs(ctx):
await ctx.send("https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/")

@bot.command()
async def pypi(ctx):
await ctx.send("https://pypi.org/project/DenzGraphingApiWrapper-py/")

@bot.command()
async def test_pypi(ctx):
await ctx.send("https://test.pypi.org/project/DenzGraphingApiWrapper-py-denzven/")

@bot.command()
async def code(ctx):
await ctx.send(file = discord.File(r'main.py'), content = "Here is the Code of This Bot")

bot.run(os.environ['bottoken']) #69 nice
20 changes: 20 additions & 0 deletions src/DenzGraphingApiWrapper_py.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Metadata-Version: 2.1
Name: DenzGraphingApiWrapper-py
Version: 0.0.1
Summary: An ApiWrapper for the DenzGraphingApi
Home-page: UNKNOWN
Author: Denzven
Author-email: denzvenvadakkan@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/denzven/DenzGraphingApiWrapper_py/issues
Project-URL: Documentation, https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/
Project-URL: Source, https://github.com/denzven/DenzGraphingApiWrapper_py
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# DenzGraphingApiWrapper_py

8 changes: 8 additions & 0 deletions src/DenzGraphingApiWrapper_py.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
README.md
pyproject.toml
setup.cfg
src/DenzGraphingApiWrapper_py/__init__.py
src/DenzGraphingApiWrapper_py.egg-info/PKG-INFO
src/DenzGraphingApiWrapper_py.egg-info/SOURCES.txt
src/DenzGraphingApiWrapper_py.egg-info/dependency_links.txt
src/DenzGraphingApiWrapper_py.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/DenzGraphingApiWrapper_py.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DenzGraphingApiWrapper_py

0 comments on commit 9c1ef95

Please sign in to comment.