インストール
win:
py -3 -m pip install samep
linux:
python3.8 -m pip install samep
追加項目
メインファイル
#main.py
from discord.ext import commands as c
from discord import Intents
from asyncpgw import start
import asyncio
class Main(c.Bot):
def __init__(self):
super().__init__(
command_prefix = '!',
description = 'this is bot',
intents = Intents.all()
)
self.tables = []
async def ps_connect(self):
"postgresqlに接続"
self.pool = await start.connect('postgres://username:password@/dbname')
async def add_table(self, table):
"""postgtesqlに作成するテーブルを追加する"""
if table not in self.tables:
self.tables.append(table)
async def on_ready(self):
print('起動しました。')
self.load_extension('samep.extension')
for table in self.tables:
await start.create(self.pool, table)
async def start(self):
await super().start('bot token')
def main(self):
loop = asyncio.get_event_loop()
loop.run_until_complete(self.ps_connect())
loop.run_until_complete(self.start())
loop.close()
if __name__ == '__main__':
bot = Main()
bot.main()
Metadata
Release files for samep 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| samep-0.0.5.tar.gz | 17.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| samep-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.3 kB
Release files / samep-0.0.5.tar.gz
| Download URL | samep-0.0.5.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0babe109201e9f8b4d607ebde7c61592055e22ffe755e7ace6f7a8510e3c5f7a
|
|
BLAKE2b-256 checksum How to use checksums |
571fdbdd226ce97b798eddd64e8cf441bf30038d92c218fa3eff206a9d6b1742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / samep-0.0.5-py3-none-any.whl
| Download URL | samep-0.0.5-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
408539102a11d03fd10d6e597af716ee21bef586edb1a413716f557967049a4c
|
|
BLAKE2b-256 checksum How to use checksums |
73c0c474e2936ffd47d6e42107ff09f9c5fa99a7d2d15c7caf8237a7615b3c51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for samep 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.