This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

ines

An extensible package made with pyramid (see http://www.pylonsproject.org/) to relate multiple applications.

Example

from ines.api import BaseAPISession
# Register APP one internal API
class OneSession(BaseAPISession):
    __app_name__ = 'app_one'  # This is required when you have multiple app in one package
    def some_method(self):
        return u'Method of app ONE called'
# Register two APP internal API
class TwoSession(BaseAPISession):
    __app_name__ = 'app_two'
    def some_method(self):
        return u'Method of app TWO called'

from ines.config import APIConfigurator
# Start APPS config
config_one = APIConfigurator(
    application_name='app_one',
    settings={'api.extension.session_path': OneSession})
config_two = APIConfigurator(
    application_name='app_two',
    settings={'api.extension.session_path': TwoSession})

from ines.view import api_config
# Add route / view for app one
config_one.add_routes(('one_app_home', ''))
@api_config(route_name='one_app_home')
def one_app_home(context, request):
    # Here we call the two APP method
    return {
        'two_app': request.api.applications.app_two.some_method(),
        'one_app': request.api.applications.app_one.some_method(),
        'one_app_direct': request.api.some_method()}
# Add route / view for app two
config_two.add_routes(('one_app_home', ''))
@api_config(route_name='one_app_home')
def one_app_home(context, request):
    # Here we call the two APP method
    return {
        'one_app': request.api.applications.app_one.some_method(),
        'two_app': request.api.applications.app_two.some_method(),
        'two_app_direct': request.api.some_method()}

# Create pyramid wsgi middleware and start server
from wsgiref.simple_server import make_server
from paste.urlmap import URLMap
from ines.wsgi import not_found_api_application
urlmap = URLMap(not_found_app=not_found_api_application({}))
urlmap['/one'] = config_one.make_wsgi_app()
urlmap['/two'] = config_two.make_wsgi_app()
server = make_server('0.0.0.0', 6543, urlmap)
server.serve_forever()

0.1 (unreleased)

Features

  • Add unit tests
  • Add documentation
  • Add ines translations

0.1 (unreleased)

Features

  • Add unit tests
  • Add documentation
  • Add ines translations

0.1a2 (2015-06-20)

Features

  • utils.make_unique_hash now receives a length attribute
  • Changed request cache located at request.cache to request.session_cache
  • Changed filesystem cache located at request.fcache to request.cache
  • New function utils.remove_file to remove system files, ignoring some errors (with retry loop)
  • New function utils.move_file to move a file ignoring some system errors
  • New function convert.make_sha256_no_cache to ignore convert.make_sha256 cache system
  • New function utils.get_file_binary to get a file binary ignoring some system errors
  • New function utils.put_binary_on_file to write/append a file ignoring some system errors
  • New function utils.put_binary_on_file to write/append a file ignoring some system errors
  • New function system.thread_is_running to check running threads, registered with system.register_thread or started with system.start_system_thread
  • New function convert.convert_timezone update datetime value to the selected timezone
  • New function convert.maybe_string to convert value to string if exists, else return None
  • New function utils.path_unique_code create file path unique code using sha256
  • New function utils.file_unique_code create file unique code using sha256
  • New function utils.string_unique_code create string unique code using sha256
  • New function mimetype.find_mimetype to find mimemtype using filename and/or file binary
  • New sql filter function api.database.sql.date_in_period_filter to create a SQLAlchemy filter to find items in a period of time
  • New cache type cache.SaveMeMemcached uses Memcached system
  • New locks type cache.LockMeMemcached uses Memcached system
  • Improve convert.make_sha256 speed using repoze.lru.LRUCache
  • Improve cache.CacheMe.get_file_path speed using repoze.lru.LRUCache
  • Improve locks.LockMe.get_file_path speed using repoze.lru.LRUCache
  • Improve convert.camelcase speed using repoze.lru.LRUCache
  • Improve convert.uncamelcase speed using repoze.lru.LRUCache
  • New properties added to authentication.AuthenticatedSession, is_user and is_apikey
  • Added ORM query to ines.api.core
  • New module api.policy.BaseTokenPolicySession. Helper for authentication using token
  • New module api.mailer. Helper for smtp mailer.
  • New method api.route_url. Creates the application route_url like request.route_url

Bug Fixes

  • Deal with IOError.errno and OSError.errno don’t ignore them

Backwards Incompatibilities

  • ines now requires SQLAlchemy >= 1.0.0
  • api_cache_decorator now receives argument expire_cache to delete saved info, instead of expire
  • locks.LockTimeout moved to exceptions.LockTimeout
  • locks.remove_file_quietly moved to utils.remove_file_quietly
  • cache.make_dir moved to utils.make_dir
  • locks.LockMe now receives argument path instead of lock_path
  • locks.LockMe.clean_junk_locks don’t receives any argument. Use locks.LockMe.clean_junk_locks_as_daemon instead.
  • api.database.BaseSQLSessionManager moved to api.database.sql.BaseSQLSessionManager
  • api.database.BaseSQLSession moved to api.database.sql.BaseSQLSession
  • api.database.sql.BaseDatabaseSessionManager moved to api.database.BaseDatabaseSessionManager
  • api.database.sql.BaseDatabaseSession moved to api.database.BaseDatabaseSession
  • ines no longer depends on repoze.tm2. If you use ines.middleware.repozerm.RepozeTMMiddleware or ines.api.database.sql.BaseSQLSessionManager or ines.api.core.BaseCoreSessionManager or ines.api.database.sql.BaseSQLSession or ines.api.core.BaseCoreSession you need to define repoze.tm2 in setup requirements.
  • ines no longer depends on transaction. If you use ines.api.database.sql.BaseDatabaseSessionManager or ines.api.core.BaseCoreSessionManager or ines.api.database.sql.BaseSQLSession or ines.api.core.BaseCoreSession you need to define transaction in setup requirements.
  • ines no longer depends on zope.sqlalchemy. If want to keep using this as sqlalchemy session extension, you need to define it on config settings like sql.session_extension = zope.sqlalchemy:ZopeTransactionExtension and define zope.sqlalchemy in setup requirements.
  • ines.api.*.settings now reads global settings keys starting with ines.api.*.__api_name__

Dependencies

  • ines now depends on repoze.lru
  • ines now depends on venusian

0.1a1 (2015-05-06)

  • Initial release.
Release History

Release History

0.1a2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ines-0.1a2.tar.gz (73.3 kB) Copy SHA256 Checksum SHA256 Source Jun 20, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting