Skip to content

Instantly share code, notes, and snippets.

@abhianair
abhianair / crontab
Last active June 11, 2021 17:08
Covid vaccine request - python - A python script to retrieve available hospital name at kozhikode if 18+ vaccine doses(dose 1) are available up to 5 days and result will be send to the email
#vaccine crons
*/30 * * * * /bin/bash -l -c 'cd /Users/username/path/to/file && python3 main.py'
#end
@abhianair
abhianair / main.py
Last active September 20, 2021 09:47
Fask Create new schema and create tables to that schema using SQLAlchemy
import sqlalchemy
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from app import db
# engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI'])
# if not engine.dialect.has_schema(engine, schema_name):
# engine.execute(sqlalchemy.schema.CreateSchema(schema_name))
# insp = sqlalchemy.inspect(engine)
# if engine.dialect.has_schema(engine, schema_name):