README.txt
branchdevel
changeset 291 84eb5a7a715a
parent 290 21601a54c44c
equal deleted inserted replaced
290:21601a54c44c 291:84eb5a7a715a
       
     1 Iro is a non blocking server for sending a message to a bunsh of recipients. It can handle different types of message and can be extended easially.
       
     2 It was initially written for sms backend of http://castorticker.de. There are different backends are supported by Iro. 
       
     3 Iro helps you for these kinds of tasks: You want to send a message to some recipient over a different backend, than for other recipients.
       
     4 Or you want to define fallback strategies: If one messages can't be send over this backend use another.
       
     5 Because Iro also knows users, you can create bills for different clients.
       
     6 
       
     7 Installation of Iro
       
     8 ===================
       
     9 
       
    10 Install the module via ``setup.py install`` und ran ``iro-install``. That will create a sample configuration file named ``iro.conf``.
       
    11 Update the configuration file and run ``iro-install install``  afterwards. That will create the Database and Offers for you.
       
    12 After that you have to `adding_user`. Now you are ready to start Iro ``twisted iro``.
       
    13 
       
    14 
       
    15 .. _adding_user:
       
    16 
       
    17 Add User and Userrights
       
    18 -----------------------
       
    19 
       
    20 You'll need user and right to spefific Offers, that a user can send with a specific Offer. Till now, it is the only way to add/modify user/userrights. 
       
    21 
       
    22  
       
    23 You can add users and userright via SQL::
       
    24 
       
    25   INSERT INTO user (name,apikey,ng_kunde) VALUES("test","a1b2c3");
       
    26   INSERT INTO userrights (user,offer,default) VALUES ("test",OFFERNAME,NULL);
       
    27 
       
    28 or use python/ipython::
       
    29 
       
    30   >>> import iro.model.schema
       
    31   >>> from iro.model.schema import *
       
    32   >>> from sqlalchemy import create_engine
       
    33   >>> from iro.model.utils import WithSession
       
    34   >>> engine = create_engine(DBURL)
       
    35   >>> with WithSession(engine) as session:
       
    36   ...   u = User(name="test",apikey="a1a2c3")      
       
    37   ...   session.add(u)
       
    38   ...   o = session.query(Offer).filter_by(name=OFFERNAME).first()
       
    39   ...   u.rights.append(Userright(o, default=None))
       
    40   ...   session.commit()
       
    41   >>>
       
    42 
       
    43 .. note::
       
    44   Please make sure that, the apikey only using *hex digest [0-9a-f]*