/opt/alt/python27/lib/python2.7/site-packages/alembic
NameSizeModeActions
autogenerate/-0755rm
ddl/-0755rm
operations/-0755rm
runtime/-0755rm
script/-0755rm
templates/-0755rm
testing/-0755rm
util/-0755rm
command.py115290644editdlrm
command.pyc123650644editdlrm
command.pyo126970644editdlrm
config.py158170644editdlrm
config.pyc142800644editdlrm
config.pyo143500644editdlrm
context.py1950644editdlrm
context.pyc3060644editdlrm
context.pyo3060644editdlrm
op.py1680644editdlrm
op.pyc2890644editdlrm
op.pyo2890644editdlrm
__init__.py3220644editdlrm
__init__.pyc6050644editdlrm
__init__.pyo6050644editdlrm
Edit: /opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyo (14350B)
Ńņ ŒM!Vc @sŪddklZddklZddkZddkZddkZddklZddkl Z ddkl Z ddk l Z d e fd „ƒYZ d e fd „ƒYZddd „Zedjo eƒndS(i’’’’(tArgumentParseri(tSafeConfigParserN(tcommand(tutil(t package_dir(tcompattConfigcBs¹eZdZd dd eid eiƒd d„Zd Z d Z d Z ei d„ƒZ d„Zei d„ƒZd„Zd„Zd„Zd „Zd „Zd d „Zd d „ZRS(sk Represent an Alembic configuration. Within an ``env.py`` script, this is available via the :attr:`.EnvironmentContext.config` attribute, which in turn is available at ``alembic.context``:: from alembic import context some_param = context.config.get_main_option("my option") When invoking Alembic programatically, a new :class:`.Config` can be created by passing the name of an .ini file to the constructor:: from alembic.config import Config alembic_cfg = Config("/path/to/yourapp/alembic.ini") With a :class:`.Config` object, you can then run Alembic commands programmatically using the directives in :mod:`alembic.command`. The :class:`.Config` object can also be constructed without a filename. Values can be set programmatically, and new sections will be created as needed:: from alembic.config import Config alembic_cfg = Config() alembic_cfg.set_main_option("script_location", "myapp:migrations") alembic_cfg.set_main_option("url", "postgresql://foo/bar") alembic_cfg.set_section_option("mysection", "foo", "bar") For passing non-string values to environments, such as connections and engines, use the :attr:`.Config.attributes` dictionary:: with engine.begin() as connection: alembic_cfg.attributes['connection'] = connection command.upgrade(alembic_cfg, "head") :param file_: name of the .ini file to open. :param ini_section: name of the main Alembic section within the .ini file :param output_buffer: optional file-like input buffer which will be passed to the :class:`.MigrationContext` - used to redirect the output of "offline generation" when using Alembic programmatically. :param stdout: buffer where the "print" output of commands will be sent. Defaults to ``sys.stdout``. .. versionadded:: 0.4 :param config_args: A dictionary of keys and values that will be used for substitution in the alembic config file. The dictionary as given is **copied** to a new one, stored locally as the attribute ``.config_args``. When the :attr:`.Config.file_config` attribute is first invoked, the replacement variable ``here`` will be added to this dictionary before the dictionary is passed to ``SafeConfigParser()`` to parse the .ini file. .. versionadded:: 0.7.0 :param attributes: optional dictionary of arbitrary Python keys/values, which will be populated into the :attr:`.Config.attributes` dictionary. .. versionadded:: 0.7.5 .. seealso:: :ref:`connection_sharing` talembiccCs[||_||_||_||_||_t|ƒ|_|o|ii|ƒndS(s*Construct a new :class:`.Config` N( tconfig_file_nametconfig_ini_sectiont output_buffertstdouttcmd_optstdictt config_argst attributestupdate(tselftfile_t ini_sectionR R R RR((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyt__init__Us     cCshS(sA Python dictionary for storage of additional state. This is a utility dictionary which can include not just strings but engines, connections, schema objects, or anything else. Use this to pass objects into an env.py script, such as passing a :class:`sqlalchemy.engine.base.Connection` when calling commands from :mod:`alembic.command` programmatically. .. versionadded:: 0.7.5 .. seealso:: :ref:`connection_sharing` :paramref:`.Config.attributes` ((R((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyR}scGs'ti|iti|ƒ|dƒdS(s!Render a message to standard out.s N(Rtwrite_outstreamR Rt text_type(Rttexttarg((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyt print_stdout“scCs†|io%tiitii|iƒƒ}nd}||idd?6}xQ|D]I}||jo6||}|d@dA!|dA}}|i||ŽqŽqŽWx]|D]U}|d?jo&ˆi|dBdCd|i|ƒƒq2ˆi|d|i|ƒƒq2WdS(DNs-ts --templateR4tgenericttypethelps"Setup template for use with 'init'ttemplates-ms --messages%Message string to use with 'revision'tmessages--sqltactiont store_truesADon't emit SQL to database - dump to standard output/file insteadtsqls--tags<Arbitrary 'tag' name - can be used by custom env.py scripts.ttags--headsCSpecify head revision or @head to base new revision on.theads--splices6Allow a non-head revision as the 'head' to splice ontotsplices --depends-ontappendsNSpecify one or more revision identifiers which this revision should depend on.t depends_ons--rev-ids9Specify a hardcoded revision id instead of generating onetrev_ids--version-paths2Specify specific path from config for version filet version_paths--branch-labels3Specify a branch label to apply to the new revisiont branch_labels-vs --verbosesUse more verbose outputtverboses--resolve-dependenciess+Treat dependency versions as down revisionstresolve_dependenciess--autogeneratesgPopulate revision script with candidate migration operations, based on comparison of database to model.t autogenerates --head-onlys0Deprecated. Use --verbose for additional outputt head_onlys-rs --rev-rangetstores1Specify a revision range; format is [start]:[end]t rev_rangeslocation of scripts directoryt directorysrevision identifiertrevisions/one or more revisions, or 'heads' for all headst revisionsii’’’’tnargst+(R tstrt add_argumentR3(tparsert positionaltkwargst kwargs_optstpositional_helpRtargstkw(t subparser(s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyt add_optionsųsœ                   R@s-cs--configRBR4s alembic.iniRCsAlternate config files-ns--nameRs6Name of section in .ini file to use for Alembic configs-xRFRLslAdditional arguments consumed by custom env.py scripts, e.g. -x setting1=somesetting -x setting2=somesettings --raiseerrRGs!Raise a full stack trace on errorit_salembic.commandiitcmd(RR]R\tadd_subparserstdirRtgetattrtinspectt isfunctionR7R8t getargspectlent add_parserR9t set_defaultsR^( RR@RfR^t subparserst_[1]tntfntspecR_tkwarg((Res?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyR?÷s@‡ 1   !c s£ˆi\}}}yN||g}|D]}|tˆ|ƒq&~t‡fd†|DƒƒŽWn<tij o-}ˆio‚qŸtit|ƒƒnXdS(Nc3s(x!|]}|tˆ|ƒfVqWdS(N(Rk(t.0tk(toptions(s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pys «s (RhRkR RR1traiseerrterrR\( RtconfigRzRuR_RwRsRyte((Rzs?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pytrun_cmd„s'! cCsk|ii|ƒ}t|dƒp|iidƒn2td|id|id|ƒ}|i||ƒdS(NRhstoo few argumentsRRR (R^t parse_argsthasattrterrorRR}R'R(RtargvRztcfg((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pytmain³s N(R7R8R:RR?RR…(((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyR>ņs  ® cKstd|ƒid|ƒdS(s(The console runner function for Alembic.R@RƒN(R>R…(RƒR@R`((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyR…æst__main__(targparseRt util.compatRRlRR;RRRRRtobjectRR>R:R…R7(((s?/opt/alt/python27/lib/python2.7/site-packages/alembic/config.pyts   åĶ