jobrow = session.query(Jobmst).filter(Jobmst.jobmst_id==job['jobmst_id']).first()
Jobmst is imported from a single module I've created called tidal.py
jobrow is an instance of Jobmst...
But I can't select any of the columns.
I've tried
http://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/quickstart.html (Steps 1..3 -> Then python install .\dist\<modulename>.tar.gz
After reading both these:
https://stackoverflow.com/a/30608672/495157
https://stackoverflow.com/questions/31384639/what-is-pythons-site-packages-directory
Then found that pip install rather than python install is way to go...
Since uninstalling causes issues per this comment:
https://stackoverflow.com/questions/37856569/pip-uninstall-working-but-giving-error
have just deleted folders in the.
<python-install>\Lib\site-packages folder
an egg.info folder and module folder)
I have this in my setup.py:
from distutils.core import setup
setup(
name='TidalConversion',
version='0.1dev',
packages=['tidalconversion',],
license='Creative Commons Attribution-Noncommercial-Share Alike license',
long_description=open('README.txt').read(),
)
I have this in my __init__.py:
#!/usr/bin/env python
import os
from tidal import *
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
engine = create_engine(os.environ['DATABASE_URL'], echo=False) #echo='debug'
Session = sessionmaker(bind=engine)
tidal is the file that contains the sqlacodegen generated classes - including the Jobmst class I can't get Intellisense on.
In my main code I have..
from tidalconversion import Session, engine, Jobmst
(tidalconversion is my module name I'm packaging stuff up in)
This is what my folder structure looks like:
Can someone advise what i have to do in order to get Intellisense working in VS Code?
"python.autoComplete.extraPaths": ["c:\\opt\\tidalconversion\tidal.py"]
Also tried this in extrapaths - no joy either:
Per this thread
${workspaceRoot}
I'd say specifically for this part:
jobrow = session.query(Jobmst).filter(Jobmst.jobmst_id==job['jobmst_id']).first() # type: Jobmst
Is it feasible for the SQLAlchemy tool to correctly add these a the library level?
It would be preferable to my client code!