Re: [ANN]:JSONStream

2013-07-17 Thread Clark C. Evans
Looks interesting.  In YAML we used three dashes as the stream
separator.

So already a YAML processor could handle a JSON stream ...



 for doc in yaml.load_all(

... --- {one: value}

... --- {two: another}

... ---

... {three: a third item in the stream,

...  with: more data}

... ):

... print doc

...

{'one': 'value'}

{'two': 'another'}

{'with': 'more data', 'three': 'a third item in the stream'}
-- 
http://mail.python.org/mailman/listinfo/python-list


HTSQL 2.2 : A Query Language for the Accidental Programmer

2011-12-16 Thread Clark C. Evans
We'd like to announce the next release of HTSQL, a high-level
query language for relational databases.  HTSQL is specifically
designed for data analysts  web developers and makes writing and 
maintaining complex queries a pleasure.  HTSQL can be used as a
command-line interpreter, a WSGI application, or a Python library.
  
  # Create an HTSQL instance.
   from htsql import HTSQL
   htsql = HTSQL(pgsql:htsql_demo)
   
  # Find all schools matching the given pattern.
   query = /school?name~$pattern
   for row in htsql.produce(query, pattern='art'):
  ... print row
  ...
  school(code=u'art', name=u'School of Art and Design', campus=u'old')
  school(code=u'la', name=u'School of Arts and Humanities',
  campus=u'old')
   
  # For schools in the old campus, get # of associated programs and
  departments.
   query = /school{name, count(program), count(department)}?campus='old'
   for row in htsql.produce(query):
  ... print %s: %d programs, %d departments % row
  ...
  School of Art and Design: 3 programs, 2 departments
  College of Education: 7 programs, 2 departments
  School of Arts and Humanities: 9 programs, 5 departments
  School of Natural Sciences: 6 programs, 4 departments 

For more detailed instructions for use with Python, see
http://htsql.org/doc/embed.html

  Homepage: http://htsql.org
  Download: http://pypi.python.org/pypi/HTSQL
  Source:   http://bitbucket.org/prometheus/htsql

Since our 2.1 release, we've focused on usability improvements.  
We've added a web-based query editor with syntax highlighting  
completion.  We also implemented a new configuration system to 
provide granular meta-data customization.  Finally, we added 
plugins for Django and SQLAlchemy integration.  For a detailed 
list of changes, see http://htsql.org/blog/htsql-2.2-final.html

Please join us at #htsql on irc.freenode.net

Clark C. Evans  Kirill Simonov
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


HTSQL 2.1-RC1 : A Query Language for the Accidental Programmer

2011-06-23 Thread Clark C. Evans
We'd like to announce the release candidate for
HTSQL 2.1, a high-level query language and web
service gateway for relational databases. HTSQL 
is specifically designed for analytical inquiries 
and targeted to data analysts and web developers.  

HTSQL is implemented as a WSGI component, works
with PostgreSQL, MySQL, SQLite and could be used
to embed ad-hoc reporting features into your
Python application.

Homepage: http://htsql.org
Download: http://pypi.python.org/pypi/HTSQL/
Source: http://bitbucket.org/prometheus/htsql

Since 2.0 release, announced in February, we added many
new language features which increase the query power
of the language.  HTSQL is now able to express quite 
sophisticated business inquiries. 

The 2.2 release of HTSQL later this year will be
focused on usability.  It'll include improved
configuration, a query editor and formatting options.

Also for this release we've cleaned up the homepage
for HTRAF -- a javascript toolkit for constructing
attractive dashboards and interactive reports.  This
toolkit is MIT licensed and implemented as a JQuery
plugin.  For more detail, please visit http://htraf.org.

Let's us know if you have any questions!

Clark C. Evans  Kirill Simonov

***
  HTSQL -- A Query Language for the Accidental Programmer
***

HTSQL (Hyper Text Structured Query Language) is a high-level query
language for relational databases.   The target audience for HTSQL is
the accidental programmer -- one who is not a SQL expert, yet needs a
usable, comprehensive query tool for data access and reporting.  

HTSQL is also a web service which takes a request via HTTP, translates
it into a SQL query, executes the query against a relational database,
and returns the results in a format requested by the user agent (JSON,
CSV, HTML, etc.).

Use of HTSQL with open source databases (PostgreSQL, MySQL, SQLite) is
royalty free under BSD-style conditions.  Use of HTSQL with proprietary
database systems (Oracle, Microsoft SQL) requires a commercial license.
See ``LICENSE`` for details.

For installation instructions, see ``INSTALL``.  For list of new
features in this release, see ``NEWS``.  HTSQL documentation is in the
``doc`` directory. 

http://htsql.org/
The HTSQL homepage

http://htsql.org/doc/introduction.html
Get taste of HTSQL

http://htsql.org/doc/tutorial.html
The HTSQL tutorial

http://bitbucket.org/prometheus/htsql
HTSQL source code

irc://irc.freenode.net#htsql
IRC chat in #htsql on freenode

http://lists.htsql.org/mailman/listinfo/htsql-users
The mailing list for users of HTSQL

HTSQL is copyright by Prometheus Research, LLC.  HTSQL is written by
Clark C. Evans c...@clarkevans.com and Kirill Simonov
x...@resolvent.net.

Generous support for HTSQL was provided by the Simons Foundation.
This material is also based upon work supported by the National
Science Foundation under Grant #0944460.

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-22 Thread Clark C. Evans
On Fri, 21 Jan 2011 21:25 -0800, rusi rustompm...@gmail.com wrote:
 On Jan 22, 2:45 am, Clark C. Evans c...@clarkevans.com wrote:
  Kirill Simonov and myself would like to introduce HTSQL, a novel
  approach to relational database access which is neither an ORM 
  nor raw SQL.
 
 Given the claim htsql is higher level than sql I am interested in
 bill-of-materials type (recursive) queries.

Rusi,

HTSQL 2.0 does not yet support SQL's common table expressions.  
However, this particular use case, along with CUBE, server-side 
stored procedures, and related needs is what made us branch 
from our 1.X production release.  Our immediate focus is SQL-92.  
Once we cover most SELECT patterns and SQL back-ends, we'll be 
looking at SQL:1999, SQL:2003, and SQL:2008 (as well as 
proprietary equivalents such as Oracle's CONNECT BY).

Best,

Clark
-- 
http://mail.python.org/mailman/listinfo/python-list


HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-21 Thread Clark C. Evans
Kirill Simonov and myself would like to introduce HTSQL, a novel
approach 
to relational database access which is neither an ORM nor raw SQL.

HTSQL is a URI-based high-level query language for relational databases.
It's implemented as a Python WSGI application.  Currently it supports
PostgreSQL and SQLite (more databases  juicy features forthcoming).

Homepage: http://htsql.org
Download: http://pypi.python.org/pypi/HTSQL/
Source:   http://bitbucket.org/prometheus/htsql

At this point, HTSQL 2.0 may not be mature enough for production use; we
expect to fill in any remaining gaps in the coming months.

We're curious what you think.  Join us in #htsql on freenode [1],
subscribe 
to the mailing list [2] and please come to our PyCon 2011 talk [3].

Clark  Kirill

[1] irc://irc.freenode.net/#htsql
[2] http://lists.htsql.org/mailman/listinfo/htsql-users
[3] http://us.pycon.org/2011/schedule/sessions/264/
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-21 Thread Clark C. Evans
Kirill Simonov and myself would like to introduce HTSQL, a novel
approach 
to relational database access which is neither an ORM nor raw SQL.

HTSQL is a URI-based high-level query language for relational databases.
It's implemented as a Python WSGI application.  Currently it supports
PostgreSQL and SQLite (more databases  juicy features forthcoming).

Homepage: http://htsql.org
Download: http://pypi.python.org/pypi/HTSQL/
Source:   http://bitbucket.org/prometheus/htsql

At this point, HTSQL 2.0 may not be mature enough for production use; we
expect to fill in any remaining gaps in the coming months.

We're curious what you think.  Join us in #htsql on freenode [1],
subscribe 
to the mailing list [2] and please come to our PyCon 2011 talk [3].

Clark  Kirill

[1] irc://irc.freenode.net/#htsql
[2] http://lists.htsql.org/mailman/listinfo/htsql-users
[3] http://us.pycon.org/2011/schedule/sessions/264/
-- 
http://mail.python.org/mailman/listinfo/python-list


feature request / max size limit on StringIO

2005-10-25 Thread Clark C. Evans
Hello.  I've not been able to use cStringIO since I have the need to
ensure that the memory buffers created are bounded within a resonable
limit set by specifications.  No, this code does not properly belong
in my application as the modules that use files should not have
to care about any resource limitations that may be imposed.

class LimitedBuffer(StringIO):
def __init__(self, buffer = None, maxsize = 5 * 1000 * 1000):
StringIO.__init__(self,buffer)
self.cursize = 0
self.maxsize = maxsize
def write(self,str):
self.cursize += len(str)
if self.cursize  self.maxsize:
raise IOError(allocated buffer space exceeded)
return StringIO.write(self,str)

Kind Regards,

Clark Evans
-- 
http://mail.python.org/mailman/listinfo/python-list


file uploading via urllib2 (multipart/form-data)

2005-01-13 Thread Clark C. Evans
Hello.  I was wondering if anyone has built a module that works with
urllib2 to upload file content via POST multipart/form-data. I'm
aware of ASPN 146306, however, I need to use urllib2 beacuse I'm
using HTTP Digest over SSL.

Cheers,

Clark
-- 
http://mail.python.org/mailman/listinfo/python-list