Add atom.py to the same directory you keep you GAE Python sources in, and make sure it's uploaded to the server when you upload your app. (The upload happens when you do appcfg.py update myapp/
unless you go out of your way to stop it; use the --verbose
flag on the command to see exactly what's being uploaded or updated).
(Or, if it's a large file, make a zipfile with it and in your handler append that zipfile to sys.path; see zipimport for example).
This assumes that you have a single file atom.py
which is what you're importing; if that file in turns imports others you'll have to make those others available too in similar ways, and so on (see modulefinder in Python's standard library for ways to find all modules you need).
If atom
is not a module but a package, then what you get on import
is the __init__.py
file in the directory that's the package; so the same advice applies (and zipimport becomes much more attractive since you can easily package up any directory structure e.g. with a zip -r
command from the Linux command line).
If at any point (as modulefinder will help you discover) there is a dependency on a third party C-coded extension (a .so
or .pyd
file that Python can use but is not written in pure Python) that is not in the short list supplied with GAE (see here), then that Python code is not usable on GAE, as GAE supports only pure-Python. If this is the case then you must look for alternatives that are supported on GAE, i.e. pure-Python ways to obtain the same functionality you require.